diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_fre.c')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_fre.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_fre.c b/src/lib/libcrypto/asn1/tasn_fre.c index c05310ec28..b621af3b37 100644 --- a/src/lib/libcrypto/asn1/tasn_fre.c +++ b/src/lib/libcrypto/asn1/tasn_fre.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tasn_fre.c,v 1.16 2018/04/06 12:16:06 bluhm Exp $ */ | 1 | /* $OpenBSD: tasn_fre.c,v 1.17 2019/04/01 15:48:04 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -193,14 +193,14 @@ void | |||
193 | ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it) | 193 | ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it) |
194 | { | 194 | { |
195 | int utype; | 195 | int utype; |
196 | if (it) { | 196 | |
197 | const ASN1_PRIMITIVE_FUNCS *pf; | 197 | if (it != NULL && it->funcs != NULL) { |
198 | pf = it->funcs; | 198 | const ASN1_PRIMITIVE_FUNCS *pf = it->funcs; |
199 | if (pf && pf->prim_free) { | 199 | |
200 | pf->prim_free(pval, it); | 200 | pf->prim_free(pval, it); |
201 | return; | 201 | return; |
202 | } | ||
203 | } | 202 | } |
203 | |||
204 | /* Special case: if 'it' is NULL free contents of ASN1_TYPE */ | 204 | /* Special case: if 'it' is NULL free contents of ASN1_TYPE */ |
205 | if (!it) { | 205 | if (!it) { |
206 | ASN1_TYPE *typ = (ASN1_TYPE *)*pval; | 206 | ASN1_TYPE *typ = (ASN1_TYPE *)*pval; |