test_command_line_internal: Fix variable original_argv going out of scope leaks the storage it points to (CID 60588).

Reported by Coverity: CID 60588: 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:
Ralf Habacker 2015-04-21 14:14:26 +02:00
parent 53fbfe0c70
commit c396b8ea56

View file

@ -93,15 +93,15 @@ test_command_line_internal (dbus_bool_t should_work,
dbus_free_string_array (shell_argv);
}
_dbus_string_free (&str);
dbus_free (original_argv);
if (!should_work)
{
printf ("# Expected an error\n");
return FALSE;
}
_dbus_string_free (&str);
dbus_free (original_argv);
return TRUE;
}