diff options
Diffstat (limited to 'crypto/x509/x509_v3.c')
-rw-r--r-- | crypto/x509/x509_v3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/x509/x509_v3.c b/crypto/x509/x509_v3.c index 4a03445a64d2..9a3517e02af1 100644 --- a/crypto/x509/x509_v3.c +++ b/crypto/x509/x509_v3.c @@ -177,7 +177,7 @@ STACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x, err2: if (new_ex != NULL) X509_EXTENSION_free(new_ex); - if (sk != NULL) + if (x != NULL && *x == NULL && sk != NULL) sk_X509_EXTENSION_free(sk); return (NULL); } |