From: "Richard W.M. Jones" <rjones(a)redhat.com>
Equivalent to free (NULL).
---
src/utils.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/utils.c b/src/utils.c
index aaf4fa5..16b7d6b 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -30,6 +30,10 @@ void
guestfs___free_string_list (char **argv)
{
size_t i;
+
+ if (argv == NULL)
+ return;
+
for (i = 0; argv[i] != NULL; ++i)
free (argv[i]);
free (argv);
--
1.8.1