From: sanghyeok.oh Date: Thu, 14 Feb 2019 11:04:56 +0000 (+0900) Subject: kdbus: Fix memory leakage in capture_org_freedesktop_DBus_StartServiceByName() X-Git-Tag: submit/tizen/20190215.045528^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cf07634b2d8db329055d3b9c987695e3154df60;p=platform%2Fupstream%2Fdbus.git kdbus: Fix memory leakage in capture_org_freedesktop_DBus_StartServiceByName() Change-Id: If4b04d0f287e199e809cdf183ce4ce779c0f4dd4 Signed-off-by: sanghyeok.oh --- diff --git a/dbus/dbus-transport-kdbus.c b/dbus/dbus-transport-kdbus.c index e9b00359..626c2a79 100755 --- a/dbus/dbus-transport-kdbus.c +++ b/dbus/dbus-transport-kdbus.c @@ -2367,7 +2367,11 @@ capture_org_freedesktop_DBus_StartServiceByName (DBusTransportKdbus *transport, dbus_message_lock (sub_message); - if (kdbus_write_msg_internal (transport, sub_message, name, NULL, FALSE) == -1) + ret = kdbus_write_msg_internal (transport, sub_message, name, NULL, FALSE); + + dbus_message_unref (sub_message); + + if (ret == -1) return NULL; else { @@ -4004,7 +4008,7 @@ kdbus_do_iteration (DBusTransport *transport, * error messages are inserted directly to incoming queue and * application hangs on dbus_poll. * - * This causes a busy loop in _dbus_connection_block_pending_call() + * This causes a busy loop in _dbus_connection_block_pending_call() * There is no case of waiting for the locally-generated error reply if (_dbus_connection_get_n_incoming (transport->connection) > 0)