From 3c458d22fdad10b41d810248c6a8efbe5b23f515 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Sat, 14 Feb 2009 18:49:17 +0100 Subject: Fix more memory leaks. --- src/plist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plist.c') diff --git a/src/plist.c b/src/plist.c index c69f4c1..0e73c4b 100644 --- a/src/plist.c +++ b/src/plist.c @@ -65,6 +65,7 @@ static void plist_free_node(GNode * node, gpointer none) free(data); } node->data = NULL; + g_node_children_foreach(node, G_TRAVERSE_ALL, plist_free_node, NULL); } plist_t plist_new_dict() @@ -144,7 +145,7 @@ static plist_t plist_add_sub_element(plist_t node, plist_type type, const void * void plist_free(plist_t plist) { - g_node_children_foreach(plist, G_TRAVERSE_ALL, plist_free_node, NULL); + plist_free_node(plist, NULL); g_node_destroy(plist); } -- cgit v1.1-32-gdbae