summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--input/input-service.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/input/input-service.c b/input/input-service.c
index dde8f31c..9518b7ee 100644
--- a/input/input-service.c
+++ b/input/input-service.c
@@ -485,8 +485,10 @@ void input_manager_free(struct input_manager *mgr)
{
if (!mgr)
return;
- if (mgr->paths)
+ if (mgr->paths) {
g_slist_foreach(mgr->paths, (GFunc) free, NULL);
+ g_slist_free(mgr->paths);
+ }
if (mgr->adapter_path)
free(mgr->adapter_path);
free(mgr);
@@ -897,6 +899,7 @@ static DBusHandlerResult manager_remove_device(DBusConnection *conn,
return err_failed(conn, msg, "D-Bus path unregistration failed");
}
+ free(l->data);
mgr->paths = g_slist_remove(mgr->paths, l->data);
return send_message_and_unref(conn, reply);