diff options
Diffstat (limited to 'lib/libcrypto/conf')
-rw-r--r-- | lib/libcrypto/conf/conf_api.c | 3 | ||||
-rw-r--r-- | lib/libcrypto/conf/conf_def.c | 18 |
2 files changed, 7 insertions, 14 deletions
diff --git a/lib/libcrypto/conf/conf_api.c b/lib/libcrypto/conf/conf_api.c index 98e058dad45..41c5b05fcbe 100644 --- a/lib/libcrypto/conf/conf_api.c +++ b/lib/libcrypto/conf/conf_api.c @@ -300,8 +300,7 @@ err: if (!ok) { if (sk != NULL) sk_CONF_VALUE_free(sk); - if (v != NULL) - free(v); + free(v); v = NULL; } return (v); diff --git a/lib/libcrypto/conf/conf_def.c b/lib/libcrypto/conf/conf_def.c index b3c75e1a9e5..b550623e57c 100644 --- a/lib/libcrypto/conf/conf_def.c +++ b/lib/libcrypto/conf/conf_def.c @@ -416,15 +416,13 @@ again: } if (buff != NULL) BUF_MEM_free(buff); - if (section != NULL) - free(section); + free(section); return (1); err: if (buff != NULL) BUF_MEM_free(buff); - if (section != NULL) - free(section); + free(section); if (line != NULL) *line = eline; ERR_asprintf_error_data("line %ld", eline); @@ -433,12 +431,9 @@ err: conf->data = NULL; } if (v != NULL) { - if (v->name != NULL) - free(v->name); - if (v->value != NULL) - free(v->value); - if (v != NULL) - free(v); + free(v->name); + free(v->value); + free(v); } return (0); } @@ -615,8 +610,7 @@ str_copy(CONF *conf, char *section, char **pto, char *from) buf->data[to++] = *(from++); } buf->data[to]='\0'; - if (*pto != NULL) - free(*pto); + free(*pto); *pto = buf->data; free(buf); return (1); |