OSDN Git Service

obexd/bluetooth: Fix memory leak
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 16 Sep 2013 10:35:10 +0000 (13:35 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 16 Sep 2013 10:35:10 +0000 (13:35 +0300)
commit6ae5bc784631751651b1f0e12c9098916f6515f9
tree95a9dcb02f2e9bf53832607e5fcbeb1150300a56
parent829f5dc298e424a8502354383bec067bef3672fb
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)
obexd/plugins/bluetooth.c