summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsanghyeok.oh <sanghyeok.oh@samsung.com>2019-02-14 20:04:56 +0900
committersanghyeok.oh <sanghyeok.oh@samsung.com>2019-02-14 20:08:56 +0900
commit2cf07634b2d8db329055d3b9c987695e3154df60 (patch)
treeb8863218343e55403bebfb652a2ebff0bff4137a
parentc484ec0eaaaa14225abcdbb8f665a8163c7315b1 (diff)
downloaddbus-2cf07634b2d8db329055d3b9c987695e3154df60.tar.gz
dbus-2cf07634b2d8db329055d3b9c987695e3154df60.tar.bz2
dbus-2cf07634b2d8db329055d3b9c987695e3154df60.zip
kdbus: Fix memory leakage in capture_org_freedesktop_DBus_StartServiceByName()submit/tizen/20190215.045528accepted/tizen/unified/20190219.154258
Change-Id: If4b04d0f287e199e809cdf183ce4ce779c0f4dd4 Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
-rwxr-xr-xdbus/dbus-transport-kdbus.c8
1 files changed, 6 insertions, 2 deletions
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)