gdbus: Fix not freeing list node by using g_slist_delete_link
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 3 Oct 2012 11:57:06 +0000 (14:57 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Thu, 4 Oct 2012 06:56:11 +0000 (09:56 +0300)
g_slist_remove_link does not free the node which can cause leaks so
replace that with g_slist_delete_link which does free memory properly.

gdbus/watch.c

index a402ca972f2a61af7e87098109901f7d692d6990..07feb619df5c73feb7bcccde582bc3773874cc67 100644 (file)
@@ -574,7 +574,7 @@ static DBusHandlerResult message_filter(DBusConnection *connection,
                        continue;
 
                remove_match(data);
-               listeners = g_slist_remove_link(listeners, l);
+               listeners = g_slist_delete_link(listeners, l);
 
                filter_data_free(data);
        }