summaryrefslogtreecommitdiffstats
path: root/apps/ca.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-01-30 11:27:43 +0100
committerRichard Levitte <levitte@openssl.org>2003-01-30 11:27:43 +0100
commit4e78074b39063d19ebab54209d5cf6eceb770141 (patch)
tree028146d9f6412ec40e1f49e4b530c2af70b2b74f /apps/ca.c
parentDVCS (see RFC 3029) was missing among the possible purposes. (diff)
downloadopenssl-4e78074b39063d19ebab54209d5cf6eceb770141.tar.xz
openssl-4e78074b39063d19ebab54209d5cf6eceb770141.zip
cert_sk isn't always allocated, so freeing it may cause a crash.
PR: 481
Diffstat (limited to 'apps/ca.c')
-rw-r--r--apps/ca.c3
1 files changed, 2 insertions, 1 deletions
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);