kconfig: remove redundant NULL pointer check before free()
Passing NULL to free() is allowed and is a no-op. Remove redundant NULL pointer checks. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
@@ -432,8 +432,7 @@ load:
|
||||
case S_INT:
|
||||
case S_HEX:
|
||||
case S_STRING:
|
||||
if (sym->def[def].val)
|
||||
free(sym->def[def].val);
|
||||
free(sym->def[def].val);
|
||||
/* fall through */
|
||||
default:
|
||||
sym->def[def].val = NULL;
|
||||
|
||||
Reference in New Issue
Block a user