diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:02:07 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:02:07 -0400 |
commit | b548a1f11c06ccdfa4f52a539912d22d77ee309e (patch) | |
tree | 37ff8792ddf09e4805aa3ba76b805923d3c52734 /ssl/ssl_asn1.c | |
parent | 33fbca83dcd05b77f807fab205c4523b8cfe85b5 (diff) |
free null cleanup finale
Don't check for NULL before calling OPENSSL_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/ssl_asn1.c')
-rw-r--r-- | ssl/ssl_asn1.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ssl/ssl_asn1.c b/ssl/ssl_asn1.c index b6e784924d..2a07a9b596 100644 --- a/ssl/ssl_asn1.c +++ b/ssl/ssl_asn1.c @@ -285,10 +285,8 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp) static int ssl_session_strndup(char **pdst, ASN1_OCTET_STRING *src) { - if (*pdst) { - OPENSSL_free(*pdst); - *pdst = NULL; - } + OPENSSL_free(*pdst); + *pdst = NULL; if (src == NULL) return 1; *pdst = BUF_strndup((char *)src->data, src->length); |