diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-05-01 19:13:39 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-05-01 19:13:39 +0000 |
commit | d8cd184883cc2233db0bde0218201a2756aa7c16 (patch) | |
tree | 04dac94e201c40a12bd7e588403dd10548bae8af /serial/manager.c | |
parent | 9aaae3b234e219d5770a972858d9ea3e9783e12e (diff) |
serial: free port_paths and unregister the D-Bus path when the daemon exits
Diffstat (limited to 'serial/manager.c')
-rw-r--r-- | serial/manager.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/serial/manager.c b/serial/manager.c index caacdd05..4f7efdb4 100644 --- a/serial/manager.c +++ b/serial/manager.c @@ -351,6 +351,14 @@ static DBusHandlerResult manager_message(DBusConnection *conn, static void manager_unregister(DBusConnection *conn, void *data) { + GSList *l; + + for (l = port_paths; l; l = l->next) + dbus_connection_unregister_object_path(conn, l->data); + + g_slist_foreach(port_paths, (GFunc) g_free, NULL); + g_slist_free(port_paths); + port_paths = NULL; } /* Virtual table to handle manager object path hierarchy */ |