summaryrefslogtreecommitdiff
path: root/netspeed/src/backend.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-03-14 08:19:47 +0100
committerZenWalker <[email protected]>2019-04-14 15:24:07 +0200
commitb02b6b0fe430b9dcb137f4aaf24efde94ba70afe (patch)
tree1d0b8acaea8cf349c6368edef6b30d901d02e084 /netspeed/src/backend.c
parent538e7566185ccd4f6accd55fcb55644c0223d82f (diff)
downloadmate-applets-b02b6b0fe430b9dcb137f4aaf24efde94ba70afe.tar.bz2
mate-applets-b02b6b0fe430b9dcb137f4aaf24efde94ba70afe.tar.xz
Use g_list_free_full() convenience function
void g_list_free_full (GList *list, GDestroyNotify free_func); Convenience method, which frees all the memory used by a GList, and calls free_func on every element's data. https://developer.gnome.org/glib/stable/glib-Doubly-Linked-Lists.html#g-list-free-full
Diffstat (limited to 'netspeed/src/backend.c')
-rw-r--r--netspeed/src/backend.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/netspeed/src/backend.c b/netspeed/src/backend.c
index bc5c91f0..a3418f82 100644
--- a/netspeed/src/backend.c
+++ b/netspeed/src/backend.c
@@ -122,8 +122,7 @@ get_default_route(void)
void
free_devices_list(GList *list)
{
- g_list_foreach(list, (GFunc)g_free, NULL);
- g_list_free(list);
+ g_list_free_full (list, g_free);
}