diff options
| author | 2009-02-14 18:49:17 +0100 | |
|---|---|---|
| committer | 2009-02-14 18:49:17 +0100 | |
| commit | 3c458d22fdad10b41d810248c6a8efbe5b23f515 (patch) | |
| tree | e9c469fa2ada4d9df4023e866eff6a3858d18f62 /src/plist.c | |
| parent | aa3a4c8d45be9da585d1aae141a546cfbbdf509f (diff) | |
| download | libplist-3c458d22fdad10b41d810248c6a8efbe5b23f515.tar.gz libplist-3c458d22fdad10b41d810248c6a8efbe5b23f515.tar.bz2 | |
Fix more memory leaks.
Diffstat (limited to 'src/plist.c')
| -rw-r--r-- | src/plist.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) | |||
| 65 | free(data); | 65 | free(data); |
| 66 | } | 66 | } |
| 67 | node->data = NULL; | 67 | node->data = NULL; |
| 68 | g_node_children_foreach(node, G_TRAVERSE_ALL, plist_free_node, NULL); | ||
| 68 | } | 69 | } |
| 69 | 70 | ||
| 70 | plist_t plist_new_dict() | 71 | plist_t plist_new_dict() |
| @@ -144,7 +145,7 @@ static plist_t plist_add_sub_element(plist_t node, plist_type type, const void * | |||
| 144 | 145 | ||
| 145 | void plist_free(plist_t plist) | 146 | void plist_free(plist_t plist) |
| 146 | { | 147 | { |
| 147 | g_node_children_foreach(plist, G_TRAVERSE_ALL, plist_free_node, NULL); | 148 | plist_free_node(plist, NULL); |
| 148 | g_node_destroy(plist); | 149 | g_node_destroy(plist); |
| 149 | } | 150 | } |
| 150 | 151 | ||
