diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2012-10-04 14:39:53 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-10-04 21:20:59 +0300 |
commit | fc67e0ca0658239b3778f6cbbd5cc778a1544714 (patch) | |
tree | 12f67fa93b55bbda7b0b7ea1ef8be1a2b8e615ff | |
parent | f1ff6e99645f19e635e4a274a79f4bbb80a73388 (diff) | |
download | bluez-fc67e0ca0658239b3778f6cbbd5cc778a1544714.tar.gz |
core: Fix leaking connection list nodes
==480== HEAP SUMMARY:
==480== in use at exit: 62,418 bytes in 355 blocks
==480== total heap usage: 11,134 allocs, 10,779 frees, 5,254,068 bytes allocated
==480==
==480== 16 bytes in 1 blocks are definitely lost in loss record 70 of 250
==480== at 0x4C2C04B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==480== by 0x4E80050: g_malloc (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x4E94442: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x4E95792: g_slist_append (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x17E483: adapter_add_connection (adapter.c:3245)
==480== by 0x187FDF: btd_event_conn_complete (event.c:470)
==480== by 0x18B72D: mgmt_event.part.36 (mgmt.c:515)
==480== by 0x4E7A474: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x4E7A7A7: ??? (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x4E7ABA1: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x1216B1: main (main.c:551)
-rw-r--r-- | src/adapter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/adapter.c b/src/adapter.c index 073c722c5..056f2a23f 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2534,6 +2534,8 @@ static void adapter_free(gpointer user_data) g_slist_free(adapter->oor_devices); + g_slist_free(adapter->connections); + g_free(adapter->path); g_free(adapter->name); g_free(adapter); |