summaryrefslogtreecommitdiffstats
path: root/crypto/bio/bss_bio.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-05-01 10:02:07 -0400
committerRich Salz <rsalz@openssl.org>2015-05-01 10:02:07 -0400
commitb548a1f11c06ccdfa4f52a539912d22d77ee309e (patch)
tree37ff8792ddf09e4805aa3ba76b805923d3c52734 /crypto/bio/bss_bio.c
parent33fbca83dcd05b77f807fab205c4523b8cfe85b5 (diff)
free null cleanup finale
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/bio/bss_bio.c')
-rw-r--r--crypto/bio/bss_bio.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c
index c6bb3d6885..c9b8e7f1c6 100644
--- a/crypto/bio/bss_bio.c
+++ b/crypto/bio/bss_bio.c
@@ -170,10 +170,7 @@ static int bio_free(BIO *bio)
if (b->peer)
bio_destroy_pair(bio);
- if (b->buf != NULL) {
- OPENSSL_free(b->buf);
- }
-
+ OPENSSL_free(b->buf);
OPENSSL_free(b);
return 1;
@@ -507,10 +504,8 @@ static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr)
size_t new_size = num;
if (b->size != new_size) {
- if (b->buf) {
- OPENSSL_free(b->buf);
- b->buf = NULL;
- }
+ OPENSSL_free(b->buf);
+ b->buf = NULL;
b->size = new_size;
}
ret = 1;