cert_sk isn't always allocated, so freeing it may cause a crash.

PR: 481
This commit is contained in:
Richard Levitte 2003-01-30 10:27:43 +00:00
parent b637670f03
commit 4e78074b39

View file

@ -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);