summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2015-04-20 21:55:27 +0200
committerRalf Habacker <ralf.habacker@freenet.de>2015-05-01 23:05:05 +0200
commite48dd5b3cadafb33fbf2fbd9749fd0a4e1a21a26 (patch)
tree42722f98d3a7dc532310ca874788620fd70fb7f2 /test
parent1d2976e4bd655f082e40c525c5fe5f1dd7dc0138 (diff)
downloaddbus-e48dd5b3cadafb33fbf2fbd9749fd0a4e1a21a26.tar.gz
test_command_line_internal: Fix 'variable shell_argv going out of scope leaks the storage it points to' (CID 54751)
Reported by Coverity: CID 54751: Resource leak (RESOURCE_LEAK) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'test')
-rw-r--r--test/shell-test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/shell-test.c b/test/shell-test.c
index 23a1bb46..1938379e 100644
--- a/test/shell-test.c
+++ b/test/shell-test.c
@@ -66,6 +66,7 @@ test_command_line_internal (dbus_bool_t should_work,
printf ("# Number of arguments returned (%d) don't match original (%d)\n",
shell_argc, original_argc);
dbus_free (original_argv);
+ dbus_free_string_array (shell_argv);
return FALSE;
}
printf ("# Number of arguments: %d\n", shell_argc);
@@ -81,6 +82,7 @@ test_command_line_internal (dbus_bool_t should_work,
i, shell_argv[i], unquoted);
dbus_free (unquoted);
dbus_free (original_argv);
+ dbus_free_string_array (shell_argv);
return FALSE;
}
dbus_free (unquoted);