From: Andre Noll Date: Fri, 26 Aug 2011 23:47:13 +0000 (+0200) Subject: string: Allow passing NULL to free_argv(). X-Git-Tag: v0.4.9~31 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=52933af594c193a3330d0dbeb803fb0262a480ed;p=paraslash.git string: Allow passing NULL to free_argv(). After all, free() also allows NULL pointers. Be liberal in what you accept... --- diff --git a/string.c b/string.c index bbb7c7dd..b16109ca 100644 --- 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);