diff options
-rw-r--r-- | src/lib/libtls/tls.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c index 277970c932..4f89a40be4 100644 --- a/src/lib/libtls/tls.c +++ b/src/lib/libtls/tls.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls.c,v 1.27 2015/09/12 21:00:38 beck Exp $ */ | 1 | /* $OpenBSD: tls.c,v 1.28 2015/09/13 13:44:07 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -380,7 +380,8 @@ tls_handshake(struct tls *ctx) | |||
380 | { | 380 | { |
381 | int rv = -1; | 381 | int rv = -1; |
382 | 382 | ||
383 | if ((ctx->conninfo = calloc(1, sizeof(*ctx->conninfo))) == NULL) | 383 | if (ctx->conninfo == NULL && |
384 | (ctx->conninfo = calloc(1, sizeof(*ctx->conninfo))) == NULL) | ||
384 | goto out; | 385 | goto out; |
385 | 386 | ||
386 | if ((ctx->flags & TLS_CLIENT) != 0) | 387 | if ((ctx->flags & TLS_CLIENT) != 0) |