projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94a8bed
)
string: Allow passing NULL to free_argv().
author
Andre Noll
<maan@systemlinux.org>
Fri, 26 Aug 2011 23:47:13 +0000
(
01:47
+0200)
committer
Andre Noll
<maan@systemlinux.org>
Sat, 3 Sep 2011 14:40:36 +0000
(16:40 +0200)
After all, free() also allows NULL pointers. Be liberal in what you
accept...
string.c
patch
|
blob
|
history
diff --git
a/string.c
b/string.c
index
bbb7c7d
..
b16109c
100644
(file)
--- a/
string.c
+++ b/
string.c
@@
-719,6
+719,8
@@
void free_argv(char **argv)
{
int i;
+ if (!argv)
+ return;
for (i = 0; argv[i]; i++)
free(argv[i]);
free(argv);