From bfd7e756884e6e516a9efcdf87b053ce8eab5372 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 20 Apr 2015 21:55:27 +0200 Subject: [PATCH 1/2] 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) --- test/shell-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/shell-test.c b/test/shell-test.c index 23a1bb4..1938379 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); -- 1.8.4.5