summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libtls/tls.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c
index 6df72e24e6..d4e8d0114f 100644
--- a/src/lib/libtls/tls.c
+++ b/src/lib/libtls/tls.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls.c,v 1.69 2017/08/09 21:27:24 claudio Exp $ */ 1/* $OpenBSD: tls.c,v 1.70 2017/08/28 13:58:02 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -235,7 +235,10 @@ tls_new(void)
235 return (NULL); 235 return (NULL);
236 236
237 tls_reset(ctx); 237 tls_reset(ctx);
238 tls_configure(ctx, tls_config_default); 238 if (tls_configure(ctx, tls_config_default) == -1) {
239 free(ctx);
240 return NULL;
241 }
239 242
240 return (ctx); 243 return (ctx);
241} 244}