diff options
author | Rich Salz <rsalz@openssl.org> | 2015-03-25 11:31:18 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-03-25 11:31:18 -0400 |
commit | ca3a82c3b364e1e584546f0f3bbb938b0b472580 (patch) | |
tree | 06c73d297f19629c1bf56bbf06dd2d443d4ac78f /apps/apps.c | |
parent | 2011b169fa90edd4d986e7dbbd3d64587d316a22 (diff) |
free NULL cleanup
This commit handles BIO_ACCEPT_free BIO_CB_FREE BIO_CONNECT_free
BIO_free BIO_free_all BIO_vfree
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps/apps.c')
-rw-r--r-- | apps/apps.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/apps.c b/apps/apps.c index 233d382cd5..1dcaabf87d 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -1114,8 +1114,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin, goto end; } end: - if (key != NULL) - BIO_free(key); + BIO_free(key); if (pkey == NULL) BIO_printf(err, "unable to load %s\n", key_descrip); return (pkey); @@ -1682,8 +1681,7 @@ BIGNUM *load_serial(char *serialfile, int create, ASN1_INTEGER **retai) ai = NULL; } err: - if (in != NULL) - BIO_free(in); + BIO_free(in); if (ai != NULL) ASN1_INTEGER_free(ai); return (ret); @@ -1741,8 +1739,7 @@ int save_serial(char *serialfile, char *suffix, BIGNUM *serial, ai = NULL; } err: - if (out != NULL) - BIO_free_all(out); + BIO_free_all(out); if (ai != NULL) ASN1_INTEGER_free(ai); return (ret); @@ -1896,8 +1893,7 @@ CA_DB *load_index(char *dbfile, DB_ATTR *db_attr) NCONF_free(dbattr_conf); if (tmpdb) TXT_DB_free(tmpdb); - if (in) - BIO_free_all(in); + BIO_free_all(in); return retdb; } |