From 52933af594c193a3330d0dbeb803fb0262a480ed Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 27 Aug 2011 01:47:13 +0200 Subject: [PATCH] string: Allow passing NULL to free_argv(). After all, free() also allows NULL pointers. Be liberal in what you accept... --- string.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.39.5