diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-10 14:23:11 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-11 15:36:06 -0800 |
commit | 5655379ce89ab55f25a536972aaa310480de9432 (patch) | |
tree | aa9cffb76485caf32da96d8d689f5a0ce6ab6c11 /parseutils.c | |
parent | 2ac6a7f029d8855fbb4e8024aab0511727ac3a67 (diff) |
Remove unnecessary checks for NULL pointers before calling free()
Not needed in C89 and later
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'parseutils.c')
-rw-r--r-- | parseutils.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/parseutils.c b/parseutils.c index 3299245..5c70f81 100644 --- a/parseutils.c +++ b/parseutils.c @@ -770,15 +770,11 @@ IncludeCreate(char *str, unsigned merge) while (first) { incl = first->next; - if (first->file) - free(first->file); - if (first->map) - free(first->map); - if (first->modifier) - free(first->modifier); - if (first->path) - free(first->path); - first->file = first->map = first->path = NULL; + free(first->file); + free(first->map); + free(first->modifier); + free(first->path); + first->file = first->map = first->modifier = first->path = NULL; free(first); first = incl; } |