summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-05-01 10:15:18 -0400
committerRich Salz <rsalz@openssl.org>2015-05-01 10:15:18 -0400
commitefa7dd64443f246004751bdaa5671bf6836e07ff (patch)
treedf55d807a97d046ce17eb12adca78ea36a6038fa /crypto/asn1
parentb548a1f11c06ccdfa4f52a539912d22d77ee309e (diff)
free NULL cleanup 11
Don't check for NULL before calling free functions. This gets: ERR_STATE_free ENGINE_free DSO_free CMAC_CTX_free COMP_CTX_free CONF_free NCONF_free NCONF_free_data _CONF_free_data A sk_free use within OBJ_sigid_free TS_TST_INFO_free (rest of TS_ API was okay) Doc update for UI_free (all uses were fine) X509V3_conf_free X509V3_section_free X509V3_string_free Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/asn1_gen.c3
-rw-r--r--crypto/asn1/asn_mstbl.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/crypto/asn1/asn1_gen.c b/crypto/asn1/asn1_gen.c
index 6756c67a47..549bc5ef36 100644
--- a/crypto/asn1/asn1_gen.c
+++ b/crypto/asn1/asn1_gen.c
@@ -511,8 +511,7 @@ static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf,
OPENSSL_free(der);
sk_ASN1_TYPE_pop_free(sk, ASN1_TYPE_free);
- if (sect)
- X509V3_section_free(cnf, sect);
+ X509V3_section_free(cnf, sect);
return ret;
}
diff --git a/crypto/asn1/asn_mstbl.c b/crypto/asn1/asn_mstbl.c
index 889cbe49c8..94ffbd8ada 100644
--- a/crypto/asn1/asn_mstbl.c
+++ b/crypto/asn1/asn_mstbl.c
@@ -154,7 +154,6 @@ static int do_tcreate(char *value, char *name)
if (!rv)
ASN1err(ASN1_F_DO_TCREATE, ERR_R_MALLOC_FAILURE);
}
- if (lst)
- sk_CONF_VALUE_pop_free(lst, X509V3_conf_free);
+ sk_CONF_VALUE_pop_free(lst, X509V3_conf_free);
return rv;
}