Don't check pointer we just freed, always set it to NULL.
authorPascal Cuoq <cuoq@trust-in-soft.com>
Wed, 6 May 2015 08:15:28 +0000 (10:15 +0200)
committerKurt Roeckx <kurt@roeckx.be>
Wed, 7 Oct 2015 16:54:13 +0000 (18:54 +0200)
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR #1231

crypto/asn1/tasn_fre.c

index e219e2c0a31d3bfe85be16bf296b75c4a437ed3f..bd955d98489859aec1ce93bf226ce8321282c5d5 100644 (file)
@@ -249,6 +249,5 @@ void asn1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it)
         ASN1_STRING_free((ASN1_STRING *)*pval);
         break;
     }
-    if (*pval)
-        *pval = NULL;
+    *pval = NULL;
 }