diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2003-01-09 13:06:49 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2003-01-09 13:06:49 +0000 |
commit | 5b7249f3021cb90bcdbd336c75c7699f8b8caf19 (patch) | |
tree | 56464036e4ec0282892c41273ceb3aca86636bac /apps | |
parent | 699543e4a269da8ab82ce5e1db59114e1bc0837c (diff) | |
download | openssl-5b7249f3021cb90bcdbd336c75c7699f8b8caf19.tar.gz |
NULL tofree when it is freed to avoid double free.
Make sure key is not NULL before freeing it.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/ca.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -597,7 +597,10 @@ bad: goto err; } if(tofree) + { OPENSSL_free(tofree); + tofree = NULL; + } if (!load_config(bio_err, conf)) goto err; @@ -1642,7 +1645,7 @@ err: if (ret) ERR_print_errors(bio_err); app_RAND_write_file(randfile, bio_err); - if (free_key) + if (free_key & key) OPENSSL_free(key); BN_free(serial); TXT_DB_free(db); |