diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2013-09-16 13:35:10 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2013-09-16 13:35:10 +0300 |
commit | 6ae5bc784631751651b1f0e12c9098916f6515f9 (patch) | |
tree | 95a9dcb02f2e9bf53832607e5fcbeb1150300a56 /obexd | |
parent | 829f5dc298e424a8502354383bec067bef3672fb (diff) |
obexd/bluetooth: Fix memory leak
g_io_channel_unix_new creates a reference which is then passed to
obex_session_start which creates its on reference via g_io_channel_ref
leading to the following leak:
at 0x4A06409: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x3B03C4D89E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3B03C88224: g_io_channel_unix_new (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x418967: profile_new_connection (bluetooth.c:148)
by 0x43D763: process_message.isra.5 (object.c:259)
Diffstat (limited to 'obexd')
-rw-r--r-- | obexd/plugins/bluetooth.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/obexd/plugins/bluetooth.c b/obexd/plugins/bluetooth.c index 6f6ace90e..017ff6091 100644 --- a/obexd/plugins/bluetooth.c +++ b/obexd/plugins/bluetooth.c @@ -152,6 +152,7 @@ static DBusMessage *profile_new_connection(DBusConnection *conn, DBG("device %s", device); connect_event(io, NULL, data); + g_io_channel_unref(io); return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); } |