From 436735632d4994924bff31f02d7b7dab226f2bf6 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Wed, 28 May 2014 13:03:26 +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@ --- lib/libssl/t1_enc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/libssl/t1_enc.c') diff --git a/lib/libssl/t1_enc.c b/lib/libssl/t1_enc.c index a9be8bdb4c4..7b4afa4d279 100644 --- a/lib/libssl/t1_enc.c +++ b/lib/libssl/t1_enc.c @@ -1019,10 +1019,8 @@ err2: SSLerr(SSL_F_TLS1_EXPORT_KEYING_MATERIAL, ERR_R_MALLOC_FAILURE); rv = 0; ret: - if (buff != NULL) - free(buff); - if (val != NULL) - free(val); + free(buff); + free(val); return (rv); } -- cgit v1.2.3