From: Richard Levitte Date: Thu, 30 Jan 2003 10:27:47 +0000 (+0000) Subject: cert_sk isn't always allocated, so freeing it may cause a crash. X-Git-Tag: OpenSSL_0_9_7a~36 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d48e6a47bd7d2073d50c932f0addcc3d5b8116a6;p=oweals%2Fopenssl.git cert_sk isn't always allocated, so freeing it may cause a crash. PR: 481 --- diff --git a/apps/ca.c b/apps/ca.c index 0182b9e718..2bc5435bb1 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -1636,7 +1636,8 @@ err: BIO_free_all(out); BIO_free_all(in); - sk_X509_pop_free(cert_sk,X509_free); + if (cert_sk) + sk_X509_pop_free(cert_sk,X509_free); if (ret) ERR_print_errors(bio_err); app_RAND_write_file(randfile, bio_err);