summaryrefslogtreecommitdiff
path: root/lib/x509/pkcs12.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-04-28 22:46:48 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-04-28 22:46:53 +0200
commit80140f20a814bfe8114ead3915a19ceca7144201 (patch)
tree5840df6c193c440187314d8947818778e0cb1278 /lib/x509/pkcs12.c
parent307c2ba1ed45895c98d683bfb23ad9fa79776574 (diff)
downloadgnutls-80140f20a814bfe8114ead3915a19ceca7144201.tar.gz
pkcs12: release CRL data on error path
This addresses issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1295 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/x509/pkcs12.c')
-rw-r--r--lib/x509/pkcs12.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/x509/pkcs12.c b/lib/x509/pkcs12.c
index e71d1f01db..16a015cb7d 100644
--- a/lib/x509/pkcs12.c
+++ b/lib/x509/pkcs12.c
@@ -1787,6 +1787,10 @@ gnutls_pkcs12_simple_parse(gnutls_pkcs12_t p12,
gnutls_x509_privkey_deinit(*key);
*key = NULL;
}
+ if (crl != NULL && *crl != NULL) {
+ gnutls_x509_crl_deinit(*crl);
+ *crl = NULL;
+ }
if (_extra_certs_len && _extra_certs != NULL) {
for (i = 0; i < _extra_certs_len; i++)
gnutls_x509_crt_deinit(_extra_certs[i]);