From 9ea87938324c8e5274af7fb1c3e832473ea5cdbe Mon Sep 17 00:00:00 2001 From: mmcc <> Date: Wed, 23 Dec 2015 20:37:23 +0000 Subject: remove NULL-checks before free() --- src/lib/libcrypto/bio/bss_bio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/lib/libcrypto/bio') diff --git a/src/lib/libcrypto/bio/bss_bio.c b/src/lib/libcrypto/bio/bss_bio.c index b5f13eb35c..c817910d93 100644 --- a/src/lib/libcrypto/bio/bss_bio.c +++ b/src/lib/libcrypto/bio/bss_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_bio.c,v 1.21 2015/10/30 15:45:57 miod Exp $ */ +/* $OpenBSD: bss_bio.c,v 1.22 2015/12/23 20:37:23 mmcc Exp $ */ /* ==================================================================== * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved. * @@ -500,10 +500,8 @@ bio_ctrl(BIO *bio, int cmd, long num, void *ptr) size_t new_size = num; if (b->size != new_size) { - if (b->buf) { - free(b->buf); - b->buf = NULL; - } + free(b->buf); + b->buf = NULL; b->size = new_size; } ret = 1; -- cgit v1.2.3-55-g6feb