summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2011-11-09 11:29:40 +0530
committerJohan Hedberg <johan.hedberg@intel.com>2011-11-14 12:52:28 +0200
commitf0a02edb4a7e3477e9ace44e8a1951560db776d4 (patch)
tree5bbab2bdb085a9b31e60267f79688e9ba59db531
parentd90d2a36015ed7b261617cb8a185c8aa82bd47ff (diff)
downloadobexd-f0a02edb4a7e3477e9ace44e8a1951560db776d4.tar.gz
Fix dbus memory leak
-rw-r--r--plugins/usb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/usb.c b/plugins/usb.c
index a0ec21b..12fb30c 100644
--- a/plugins/usb.c
+++ b/plugins/usb.c
@@ -242,11 +242,13 @@ static void *usb_start(struct obex_server *server, int *err)
if (dbus_connection_send_with_reply(connection,
msg, &call, -1) == FALSE) {
error("usb: unable to send mode_request");
+ dbus_message_unref(msg);
goto fail;
}
dbus_pending_call_set_notify(call, mode_request_reply, server, NULL);
dbus_pending_call_unref(call);
+ dbus_message_unref(msg);
id = g_dbus_add_signal_watch(connection, NULL, NULL,
"com.meego.usb_moded",