mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 00:37:59 +02:00
dbus_test_tool_spam: Fix 'variable random_sizes going out of scope leaks the storage it points to' (CID 54761)
Reported by Coverity: CID 54761: 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
1ba6c3956b
commit
580b44f72d
1 changed files with 2 additions and 0 deletions
|
|
@ -367,6 +367,7 @@ dbus_test_tool_spam (int argc, char **argv)
|
|||
fprintf (stderr, "Failed to connect to bus: %s: %s\n",
|
||||
error.name, error.message);
|
||||
dbus_error_free (&error);
|
||||
dbus_free (random_sizes);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -512,6 +513,7 @@ dbus_test_tool_spam (int argc, char **argv)
|
|||
VERBOSE (stderr, "Done\n");
|
||||
|
||||
dbus_free (payload_buf);
|
||||
dbus_free (random_sizes);
|
||||
|
||||
if (template != NULL)
|
||||
dbus_message_unref (template);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue