diff options
author | Rich Salz <rsalz@openssl.org> | 2015-04-11 16:32:54 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-04-11 16:32:54 -0400 |
commit | e0e920b1a063f14f36418f8795c96f2c649400e1 (patch) | |
tree | b1704b3c1e380e01ab8fce7806bbd8d1d6997fa2 /crypto/pkcs12/p12_init.c | |
parent | a38537721dfdd853c40b4b4d99b57950075b0178 (diff) |
free NULL cleanup 9
Ongoing work to skip NULL check before calling free routine. This gets:
ecp_nistz256_pre_comp_free nistp224_pre_comp_free nistp256_pre_comp_free
nistp521_pre_comp_free PKCS7_free PKCS7_RECIP_INFO_free
PKCS7_SIGNER_INFO_free sk_PKCS7_pop_free PKCS8_PRIV_KEY_INFO_free
PKCS12_free PKCS12_SAFEBAG_free PKCS12_free sk_PKCS12_SAFEBAG_pop_free
SSL_CONF_CTX_free SSL_CTX_free SSL_SESSION_free SSL_free ssl_cert_free
ssl_sess_cert_free
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/pkcs12/p12_init.c')
-rw-r--r-- | crypto/pkcs12/p12_init.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/pkcs12/p12_init.c b/crypto/pkcs12/p12_init.c index 34710e9e69..22fa10e865 100644 --- a/crypto/pkcs12/p12_init.c +++ b/crypto/pkcs12/p12_init.c @@ -83,10 +83,9 @@ PKCS12 *PKCS12_init(int mode) PKCS12err(PKCS12_F_PKCS12_INIT, PKCS12_R_UNSUPPORTED_PKCS12_MODE); goto err; } - return pkcs12; + err: - if (pkcs12 != NULL) - PKCS12_free(pkcs12); + PKCS12_free(pkcs12); return NULL; } |