From 9aa246958bcd004471272369b71cb266aac91519 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Tue, 18 Oct 2011 21:24:39 -0200 Subject: [PATCH] Fix leak of dbus message --- test/mpris-player.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/mpris-player.c b/test/mpris-player.c index 9e63b4b4c..29bea46be 100644 --- a/test/mpris-player.c +++ b/test/mpris-player.c @@ -122,6 +122,7 @@ static dbus_bool_t emit_property_changed(DBusConnection *conn, { DBusMessage *signal; DBusMessageIter iter; + dbus_bool_t result; signal = dbus_message_new_signal(path, interface, "PropertyChanged"); @@ -137,7 +138,10 @@ static dbus_bool_t emit_property_changed(DBusConnection *conn, append_variant(&iter, type, value); - return dbus_connection_send(conn, signal, NULL); + result = dbus_connection_send(conn, signal, NULL); + dbus_message_unref(signal); + + return result; } static int parse_property(DBusConnection *conn, const char *path, -- 2.47.3