summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/crypto/x509.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/crypto/x509.c b/src/crypto/x509.c
index 18a8cebe..2180173b 100644
--- a/src/crypto/x509.c
+++ b/src/crypto/x509.c
@@ -1068,6 +1068,7 @@ int x509_certificate ( const void *data, size_t len,
/* Parse certificate */
if ( ( rc = x509_parse ( *cert, &cursor ) ) != 0 ) {
x509_put ( *cert );
+ *cert = NULL;
return rc;
}