fix if(p)/free(p) construct
No need of explicit NULL check before free.
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c
index 2630919..13369e6 100644
--- a/scripts/kconfig/util.c
+++ b/scripts/kconfig/util.c
@@ -79,8 +79,7 @@
/* 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;
}