summaryrefslogtreecommitdiff
path: root/lib/libssl/t1_enc.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-05-28 13:03:26 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-05-28 13:03:26 +0000
commit436735632d4994924bff31f02d7b7dab226f2bf6 (patch)
tree358e1760f95dbd12d24d7eb38148ab5740d4bb6c /lib/libssl/t1_enc.c
parent1703dc799b051c805bf5e161e6f91e12f42e5d47 (diff)
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@
Diffstat (limited to 'lib/libssl/t1_enc.c')
-rw-r--r--lib/libssl/t1_enc.c6
1 files changed, 2 insertions, 4 deletions
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);
}