summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/comp/c_zlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/comp/c_zlib.c')
-rw-r--r--src/lib/libcrypto/comp/c_zlib.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/libcrypto/comp/c_zlib.c b/src/lib/libcrypto/comp/c_zlib.c
index 4951ade810..d9a3359313 100644
--- a/src/lib/libcrypto/comp/c_zlib.c
+++ b/src/lib/libcrypto/comp/c_zlib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: c_zlib.c,v 1.17 2014/11/03 16:58:28 tedu Exp $ */ 1/* $OpenBSD: c_zlib.c,v 1.18 2015/12/23 20:37:23 mmcc Exp $ */
2#include <stdio.h> 2#include <stdio.h>
3#include <stdlib.h> 3#include <stdlib.h>
4#include <string.h> 4#include <string.h>
@@ -524,18 +524,14 @@ bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr)
524 } 524 }
525 525
526 if (ibs != -1) { 526 if (ibs != -1) {
527 if (ctx->ibuf) { 527 free(ctx->ibuf);
528 free(ctx->ibuf); 528 ctx->ibuf = NULL;
529 ctx->ibuf = NULL;
530 }
531 ctx->ibufsize = ibs; 529 ctx->ibufsize = ibs;
532 } 530 }
533 531
534 if (obs != -1) { 532 if (obs != -1) {
535 if (ctx->obuf) { 533 free(ctx->obuf);
536 free(ctx->obuf); 534 ctx->obuf = NULL;
537 ctx->obuf = NULL;
538 }
539 ctx->obufsize = obs; 535 ctx->obufsize = obs;
540 } 536 }
541 ret = 1; 537 ret = 1;