From 71812b42755cf65c694873ac66bcaa6bf3c817ca Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 23 Sep 2008 17:52:45 -0700 Subject: Fix invalid read when passing a path which happens to be freed on destroy callback function. --- serial/proxy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'serial') 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) -- cgit