From b548a1f11c06ccdfa4f52a539912d22d77ee309e Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 1 May 2015 10:02:07 -0400 Subject: free null cleanup finale Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte --- crypto/asn1/tasn_dec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crypto/asn1/tasn_dec.c') diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index ef19fcdfae..c5caff7ddd 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -765,7 +765,7 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, *in = p; ret = 1; err: - if (free_cont && buf.data) + if (free_cont) OPENSSL_free(buf.data); return ret; } @@ -882,8 +882,7 @@ static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, } /* If we've already allocated a buffer use it */ if (*free_cont) { - if (stmp->data) - OPENSSL_free(stmp->data); + OPENSSL_free(stmp->data); stmp->data = (unsigned char *)cont; /* UGLY CAST! RL */ stmp->length = len; *free_cont = 0; -- cgit v1.2.3