aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/confdata.c3
-rw-r--r--scripts/kconfig/util.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 303df0be7..8f4ecbd33 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -124,8 +124,7 @@ int conf_read_simple(const char *name)
case S_INT:
case S_HEX:
case S_STRING:
- if (sym->user.val)
- free(sym->user.val);
+ free(sym->user.val);
default:
sym->user.val = NULL;
sym->user.tri = no;
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c
index 263091945..13369e6a1 100644
--- a/scripts/kconfig/util.c
+++ b/scripts/kconfig/util.c
@@ -79,8 +79,7 @@ struct gstr str_assign(const char *s)
/* Free storage for growable string */
void str_free(struct gstr *gs)
{
- if (gs->s)
- free(gs->s);
+ free(gs->s);
gs->s = NULL;
gs->len = 0;
}