summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/tasn_prn.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-04-30 17:30:03 +0200
committerRich Salz <rsalz@openssl.org>2015-04-30 17:31:07 +0200
commit2ace745022f5af0709297e96eb0b0829c87c4291 (patch)
tree4352672cd8681d1df32edd39443c50a98fe0b065 /crypto/asn1/tasn_prn.c
parentFix bug, "what mode" test was wrong. (diff)
downloadopenssl-2ace745022f5af0709297e96eb0b0829c87c4291.tar.xz
openssl-2ace745022f5af0709297e96eb0b0829c87c4291.zip
free NULL cleanup 8
Do not check for NULL before calling a free routine. This addresses: ASN1_BIT_STRING_free ASN1_GENERALIZEDTIME_free ASN1_INTEGER_free ASN1_OBJECT_free ASN1_OCTET_STRING_free ASN1_PCTX_free ASN1_SCTX_free ASN1_STRING_clear_free ASN1_STRING_free ASN1_TYPE_free ASN1_UTCTIME_free M_ASN1_free_of Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/asn1/tasn_prn.c')
-rw-r--r--crypto/asn1/tasn_prn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c
index 76d584b2ba..10974eb7f4 100644
--- a/crypto/asn1/tasn_prn.c
+++ b/crypto/asn1/tasn_prn.c
@@ -100,7 +100,8 @@ ASN1_PCTX *ASN1_PCTX_new(void)
void ASN1_PCTX_free(ASN1_PCTX *p)
{
- OPENSSL_free(p);
+ if (p)
+ OPENSSL_free(p);
}
unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p)