summaryrefslogtreecommitdiffstats
path: root/serial
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-09-23 17:52:45 -0700
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-09-23 17:54:01 -0700
commit71812b42755cf65c694873ac66bcaa6bf3c817ca (patch)
treee1593a101058a3448b8421d0ff20378336ba75e9 /serial
parenta8a26772d1a5ff139284ec702b269b832fa18dd7 (diff)
Fix invalid read when passing a path which happens to be freed on destroy callback function.
Diffstat (limited to 'serial')
-rw-r--r--serial/proxy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/serial/proxy.c b/serial/proxy.c
index 7128bdbc..643e19aa 100644
--- a/serial/proxy.c
+++ b/serial/proxy.c
@@ -1002,9 +1002,11 @@ static void manager_path_unregister(void *data)
/* Remove proxy objects */
for (l = adapter->proxies; l; l = l->next) {
struct serial_proxy *prx = l->data;
+ char *path = g_strdup(prx->path);
- g_dbus_unregister_interface(adapter->conn, prx->path,
+ g_dbus_unregister_interface(adapter->conn, path,
SERIAL_PROXY_INTERFACE);
+ g_free(path);
}
if (adapter->conn)