diff options
author | Pavel Kopyl <p.kopyl@samsung.com> | 2017-11-03 18:18:59 +0300 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-05-02 08:35:32 +0200 |
commit | aebd0e5ca12d1ba0b229a4121a54afa5ea2d8aa1 (patch) | |
tree | b9fca98d10a2a71395910ef190652f41e16701aa /apps/ca.c | |
parent | c4fa1f7fc016919a5b3d4ea2aa66c77e0cc40c9d (diff) | |
download | openssl-new-aebd0e5ca12d1ba0b229a4121a54afa5ea2d8aa1.tar.gz |
Fix memory leaks in CA related functions.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4700)
Diffstat (limited to 'apps/ca.c')
-rw-r--r-- | apps/ca.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -934,10 +934,13 @@ end_of_options: if (j > 0) { total_done++; BIO_printf(bio_err, "\n"); - if (!BN_add_word(serial, 1)) + if (!BN_add_word(serial, 1)) { + X509_free(x); goto end; + } if (!sk_X509_push(cert_sk, x)) { BIO_printf(bio_err, "Memory allocation failure\n"); + X509_free(x); goto end; } } |