summaryrefslogtreecommitdiff
path: root/obexd/src
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-05-29 13:54:47 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-05-29 14:40:06 +0300
commit624159e7ddede670fb3dafabb28093d72a3a12ac (patch)
treeb5f8401510826d770914c1ddf45212ff715a1c9c /obexd/src
parenta0c7cfbcc1a77bfbca9f3d880f1e48f27a808f04 (diff)
downloadbluez-624159e7ddede670fb3dafabb28093d72a3a12ac.tar.gz
obexd: Fix not unregistering interface when a session is detroyed
The path used for unregistering is wrong so the Session interface is still reachable after the object is destroyed which can cause crashes such as the following: invalid read of size 8 at 0x4297C4: get_destination (manager.c:286) by 0x41130B: properties_get (object.c:800) by 0x410710: process_message.isra.4 (object.c:258) by 0x3F3461D9C4: ??? (in /usr/lib64/libdbus-1.so.3.7.2) by 0x3F3460FC1F: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.7.2) by 0x40E207: message_dispatch (mainloop.c:76) by 0x3F31A485DA: ??? (in /usr/lib64/libglib-2.0.so.0.3400.2) by 0x3F31A47A54: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3400.2) by 0x3F31A47D87: ??? (in /usr/lib64/libglib-2.0.so.0.3400.2) by 0x3F31A48181: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3400.2) by 0x40DDB2: main (main.c:319)
Diffstat (limited to 'obexd/src')
-rw-r--r--obexd/src/manager.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/obexd/src/manager.c b/obexd/src/manager.c
index d0991e901..72a62b001 100644
--- a/obexd/src/manager.c
+++ b/obexd/src/manager.c
@@ -845,7 +845,9 @@ done:
void manager_unregister_session(struct obex_session *os)
{
- char *path = g_strdup_printf("%s/session%u", OBEX_BASE_PATH, os->id);
+ char *path;
+
+ path = g_strdup_printf("%s/session%u", SESSION_BASE_PATH, os->id);
g_dbus_unregister_interface(connection, path, SESSION_INTERFACE);