diff options
-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 */ |