summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-04-30 13:25:16 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-04-30 13:27:13 +0200
commit7265612d87f51c2f52a2e4cf5bdf14f31bd291a2 (patch)
tree41139845c5006e4c6d14ad9e30a9e78e1a76e4a2
parentace6cbd989db6e9413f7e5cc9c6867a7a12ad048 (diff)
downloadgnutls-tmp-fix-pkcs12-crash2.tar.gz
gnutls_pkcs12_simple_parse: set to null vars after deinitializationtmp-fix-pkcs12-crash2
This avoids having the variables being deinitialized twice during cleanup. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-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 16a015cb7d..2b7b8d6402 100644
--- a/lib/x509/pkcs12.c
+++ b/lib/x509/pkcs12.c
@@ -1670,6 +1670,7 @@ gnutls_pkcs12_simple_parse(gnutls_pkcs12_t p12,
if (ret < 0) {
gnutls_assert();
gnutls_x509_crt_deinit(this_cert);
+ this_cert = NULL;
goto done;
}
@@ -1682,6 +1683,7 @@ gnutls_pkcs12_simple_parse(gnutls_pkcs12_t p12,
if (ret < 0) {
gnutls_assert();
gnutls_x509_crt_deinit(this_cert);
+ this_cert = NULL;
goto done;
}
@@ -1721,6 +1723,7 @@ gnutls_pkcs12_simple_parse(gnutls_pkcs12_t p12,
} else {
gnutls_x509_crt_deinit
(this_cert);
+ this_cert = NULL;
}
}
break;
@@ -1743,6 +1746,7 @@ gnutls_pkcs12_simple_parse(gnutls_pkcs12_t p12,
if (ret < 0) {
gnutls_assert();
gnutls_x509_crl_deinit(*crl);
+ *crl = NULL;
goto done;
}
break;