From 58d82b289db469d336d518a0e13669ca30ed96f7 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Thu, 12 Jan 2017 16:15:58 +0000 Subject: If tls_set_cbs() fails an error will already be specified, so do not replace it with a less specific one. --- src/lib/libtls/tls_client.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib/libtls/tls_client.c') diff --git a/src/lib/libtls/tls_client.c b/src/lib/libtls/tls_client.c index 18e1667eed..d22a8a95ce 100644 --- a/src/lib/libtls/tls_client.c +++ b/src/lib/libtls/tls_client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_client.c,v 1.38 2016/12/26 16:20:58 jsing Exp $ */ +/* $OpenBSD: tls_client.c,v 1.39 2017/01/12 16:15:58 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -276,10 +276,8 @@ tls_connect_cbs(struct tls *ctx, tls_read_cb read_cb, if (tls_connect_common(ctx, servername) != 0) goto err; - if (tls_set_cbs(ctx, read_cb, write_cb, cb_arg) != 0) { - tls_set_errorx(ctx, "callback registration failure"); + if (tls_set_cbs(ctx, read_cb, write_cb, cb_arg) != 0) goto err; - } rv = 0; -- cgit v1.2.3-55-g6feb