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>
This commit is contained in:
Maninder Singh
2015-06-01 10:38:07 +00:00
committed by Denys Vlasenko
parent d90899206d
commit 0fabedf085
4 changed files with 7 additions and 14 deletions

View File

@ -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;