From 998fa1ab019257dc461b84ef72e58269e86256b0 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 20 Apr 2015 21:40:14 +0200 Subject: [PATCH] dbus_test_tool_spam: Fix 'variable random_sizes going out of scope leaks the storage it points to' (CID 54761) Coverity-ID: 54761: Resource leak (RESOURCE_LEAK) --- tools/dbus-spam.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/dbus-spam.c b/tools/dbus-spam.c index e708ea2..afb34da 100644 --- a/tools/dbus-spam.c +++ b/tools/dbus-spam.c @@ -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); -- 1.8.4.5