diff options
author | beck <> | 2017-08-28 13:58:02 +0000 |
---|---|---|
committer | beck <> | 2017-08-28 13:58:02 +0000 |
commit | 25258122ceacc0befc2dd3c6150cc89fd6c00a7a (patch) | |
tree | 5c7b7f1651e6a772bff4528f12f1c55a0b430f55 /src/lib | |
parent | 6c75fbeb689a4a6974cf8563cfed0607f7f765f0 (diff) | |
download | openbsd-25258122ceacc0befc2dd3c6150cc89fd6c00a7a.tar.gz openbsd-25258122ceacc0befc2dd3c6150cc89fd6c00a7a.tar.bz2 openbsd-25258122ceacc0befc2dd3c6150cc89fd6c00a7a.zip |
Fix unchecked return nit
ok bcook@ jsing@
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libtls/tls.c | 7 |
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 | } |