[libgxps] document-structure: plug small memory leak
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgxps] document-structure: plug small memory leak
- Date: Tue, 17 Jan 2017 14:25:52 +0000 (UTC)
commit ad8b2c494dea4c7e3dbc03de9eed6e57e36c151f
Author: Paolo Borelli <pborelli gnome org>
Date: Tue Jan 17 09:27:32 2017 +0100
document-structure: plug small memory leak
libgxps/gxps-document-structure.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/libgxps/gxps-document-structure.c b/libgxps/gxps-document-structure.c
index 0edee29..b382131 100644
--- a/libgxps/gxps-document-structure.c
+++ b/libgxps/gxps-document-structure.c
@@ -76,9 +76,7 @@ outline_node_free (OutlineNode *node)
g_free (node->desc);
g_free (node->target);
-
- if (node->children)
- g_list_foreach (node->children, (GFunc)outline_node_free, NULL);
+ g_list_free_full (node->children, (GDestroyNotify)outline_node_free);
g_slice_free (OutlineNode, node);
}
@@ -99,7 +97,7 @@ gxps_document_structure_finalize (GObject *object)
}
if (structure->priv->outline) {
- g_list_foreach (structure->priv->outline, (GFunc)outline_node_free, NULL);
+ g_list_free_full (structure->priv->outline, (GDestroyNotify)outline_node_free);
structure->priv->outline = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]