From 1904ce01988b6ea0f5775507b4d812459c5b3f50 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Wed, 28 May 2014 13:03:25 +0000 Subject: There is no point in checking if a pointer is non-NULL before calling free, since free already does this for us. Also remove some pointless NULL assignments, where the result from malloc(3) is immediately assigned to the same variable. ok miod@ --- src/lib/libssl/s3_both.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/lib/libssl/s3_both.c') diff --git a/src/lib/libssl/s3_both.c b/src/lib/libssl/s3_both.c index 9dcdd7b998..f1d686b56f 100644 --- a/src/lib/libssl/s3_both.c +++ b/src/lib/libssl/s3_both.c @@ -719,20 +719,16 @@ ssl3_setup_buffers(SSL *s) int ssl3_release_write_buffer(SSL *s) { - if (s->s3->wbuf.buf != NULL) { - free(s->s3->wbuf.buf); - s->s3->wbuf.buf = NULL; - } + free(s->s3->wbuf.buf); + s->s3->wbuf.buf = NULL; return 1; } int ssl3_release_read_buffer(SSL *s) { - if (s->s3->rbuf.buf != NULL) { - free(s->s3->rbuf.buf); - s->s3->rbuf.buf = NULL; - } + free(s->s3->rbuf.buf); + s->s3->rbuf.buf = NULL; return 1; } -- cgit v1.2.3-55-g6feb