mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-04 15:20:31 +01:00
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>
This commit is contained in:
parent
1d2976e4bd
commit
e48dd5b3ca
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue