aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/bio_ndef.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2021-09-01 02:23:22 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2021-09-01 02:23:22 +0000
commitc1d1798abd60f12527b70443cb7d0b9cd78ef7b1 (patch)
tree1ac1ccb6b23135a8b57efdff5c4a84ad03202f7a /crypto/asn1/bio_ndef.c
parent94fa08a4bcdfbb3434b025d67d014af3b18e5380 (diff)
downloadsrc-c1d1798abd60f12527b70443cb7d0b9cd78ef7b1.tar.gz
src-c1d1798abd60f12527b70443cb7d0b9cd78ef7b1.zip
Diffstat (limited to 'crypto/asn1/bio_ndef.c')
-rw-r--r--crypto/asn1/bio_ndef.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/asn1/bio_ndef.c b/crypto/asn1/bio_ndef.c
index d7d7d80eea91..760e4846a474 100644
--- a/crypto/asn1/bio_ndef.c
+++ b/crypto/asn1/bio_ndef.c
@@ -142,6 +142,9 @@ static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen,
ndef_aux = *(NDEF_SUPPORT **)parg;
+ if (ndef_aux == NULL)
+ return 0;
+
OPENSSL_free(ndef_aux->derbuf);
ndef_aux->derbuf = NULL;