mirror of
https://github.com/openssl/openssl.git
synced 2024-12-04 23:43:55 +08:00
NULL tofree when it is freed to avoid double free.
Make sure key is not NULL before freeing it.
This commit is contained in:
parent
699543e4a2
commit
5b7249f302
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user