diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-05-30 02:52:12 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-05-30 02:52:12 +0000 |
commit | 890019d42bea9ea72b2a114957766c9c1b3cb7e3 (patch) | |
tree | db57e71a5688e5229112337dcc33ca76da88d600 /lib/libcrypto/x509 | |
parent | 8e9c3c8ab205533cebb588280a86d9ff2ec73fa2 (diff) |
no need for null check before free. from Brendan MacDonell
Diffstat (limited to 'lib/libcrypto/x509')
-rw-r--r-- | lib/libcrypto/x509/by_dir.c | 3 | ||||
-rw-r--r-- | lib/libcrypto/x509/x509_vpm.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/libcrypto/x509/by_dir.c b/lib/libcrypto/x509/by_dir.c index fdfca6140ad..554f6600dc9 100644 --- a/lib/libcrypto/x509/by_dir.c +++ b/lib/libcrypto/x509/by_dir.c @@ -184,8 +184,7 @@ by_dir_hash_cmp(const BY_DIR_HASH * const *a, static void by_dir_entry_free(BY_DIR_ENTRY *ent) { - if (ent->dir) - free(ent->dir); + free(ent->dir); if (ent->hashes) sk_BY_DIR_HASH_pop_free(ent->hashes, by_dir_hash_free); free(ent); diff --git a/lib/libcrypto/x509/x509_vpm.c b/lib/libcrypto/x509/x509_vpm.c index c2cebd936fc..3ee3116ac17 100644 --- a/lib/libcrypto/x509/x509_vpm.c +++ b/lib/libcrypto/x509/x509_vpm.c @@ -212,8 +212,7 @@ X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to, const X509_VERIFY_PARAM *from) int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name) { - if (param->name) - free(param->name); + free(param->name); param->name = BUF_strdup(name); if (param->name) return 1; |