summaryrefslogtreecommitdiff
path: root/libc/misc/glob/glob.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-20 20:39:38 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-20 20:39:38 +0000
commit88917b0f143e2eac468aea14338b4d9eddba389d (patch)
tree790fd49f0632b93a7ad9cd02974bff82efa60b25 /libc/misc/glob/glob.c
parent43eb269ab1d216074e18dadc74c9671398dfe938 (diff)
replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe.
Diffstat (limited to 'libc/misc/glob/glob.c')
-rw-r--r--libc/misc/glob/glob.c3
1 files changed, 1 insertions, 2 deletions
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;