From 88917b0f143e2eac468aea14338b4d9eddba389d Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 20 May 2008 20:39:38 +0000 Subject: replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe. --- libc/misc/glob/glob.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libc/misc/glob/glob.c') diff --git a/libc/misc/glob/glob.c b/libc/misc/glob/glob.c index 00c49688f..8d3e3c450 100644 --- a/libc/misc/glob/glob.c +++ b/libc/misc/glob/glob.c @@ -482,8 +482,7 @@ static int glob_in_dir (const char *pattern, const char *directory, int flags, } while (names != NULL) { - if (names->name != NULL) - free (names->name); + free (names->name); names = names->next; } return GLOB_NOSPACE; -- cgit v1.2.3