From: Richard Levitte Date: Thu, 30 Jan 2003 10:27:43 +0000 (+0000) Subject: cert_sk isn't always allocated, so freeing it may cause a crash. X-Git-Tag: BEN_FIPS_TEST_1~38^2~356 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4e78074b39063d19ebab54209d5cf6eceb770141;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 028dd98d31..2a56e556a3 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -1641,7 +1641,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);