diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2013-09-25 11:31:08 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2013-09-25 11:40:12 +0300 |
commit | d6b20f4df69ecaff11df5107b899b3297223cabe (patch) | |
tree | fcc64f252bc81e9dbf6cc9f0510ac4a999126f4a /obexd | |
parent | b68ae057e3938087d3b4e7da653ff96025b896f4 (diff) | |
download | bluez-d6b20f4df69ecaff11df5107b899b3297223cabe.tar.gz |
obexd/server: Fix leaking drivers list
The leak can be detected by using G_SLICE=always-malloc which will
produce the following trace using valgrind:
112 bytes in 7 blocks are definitely lost in loss record 123 of 167
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 0x3B03C6344D: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3B03C647A5: g_slist_append (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x424DD3: obex_service_driver_list (service.c:76)
by 0x42517F: obex_server_init (server.c:64)
by 0x40D439: main (main.c:304)
Diffstat (limited to 'obexd')
-rw-r--r-- | obexd/src/server.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/obexd/src/server.c b/obexd/src/server.c index 36e6c7c1e..007c27e56 100644 --- a/obexd/src/server.c +++ b/obexd/src/server.c @@ -110,6 +110,7 @@ void obex_server_exit(void) struct obex_server *server = l->data; server->transport->stop(server->transport_data); + g_slist_free(server->drivers); g_free(server); } |