summaryrefslogtreecommitdiffstats
path: root/crypto/conf/conf_def.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-05-01 14:37:16 -0400
committerRich Salz <rsalz@openssl.org>2015-05-01 14:37:16 -0400
commit25aaa98aa249d26391c1994d2de449562c8b8b99 (patch)
tree6f83efd87fa9fd832e8a456e9686143a29f1dab3 /crypto/conf/conf_def.c
parent666964780a245c14e8f0eb6e13dd854a37387ea9 (diff)
free NULL cleanup -- coda
After the finale, the "real" final part. :) Do a recursive grep with "-B1 -w [a-zA-Z0-9_]*_free" to see if any of the preceeding lines are an "if NULL" check that can be removed. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/conf/conf_def.c')
-rw-r--r--crypto/conf/conf_def.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index bd2e8c096e..0ed06e11b8 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -391,19 +391,17 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
v = NULL;
}
}
- if (buff != NULL)
- BUF_MEM_free(buff);
+ BUF_MEM_free(buff);
OPENSSL_free(section);
return (1);
err:
- if (buff != NULL)
- BUF_MEM_free(buff);
+ BUF_MEM_free(buff);
OPENSSL_free(section);
if (line != NULL)
*line = eline;
BIO_snprintf(btmp, sizeof btmp, "%ld", eline);
ERR_add_error_data(2, "line ", btmp);
- if ((h != conf->data) && (conf->data != NULL)) {
+ if (h != conf->data) {
CONF_free(conf->data);
conf->data = NULL;
}
@@ -595,8 +593,7 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from)
OPENSSL_free(buf);
return (1);
err:
- if (buf != NULL)
- BUF_MEM_free(buf);
+ BUF_MEM_free(buf);
return (0);
}