diff options
author | Corentin Noël <corentin.noel@collabora.com> | 2019-05-07 10:02:57 +0200 |
---|---|---|
committer | Corentin Noël <corentin@elementary.io> | 2019-05-21 08:26:39 +0000 |
commit | f46af86c6edbdf473da9101bb9418ee62ae79c3e (patch) | |
tree | 8a7193a1a930266e9b144a3571e94f4493493dd0 /plugins | |
parent | 55f03589e9c305cf3c4b9e108271a98a91da14cc (diff) | |
download | glade-f46af86c6edbdf473da9101bb9418ee62ae79c3e.tar.gz |
Couple of fixes for memory leaks found with valgrind
Most of them are unfreed string and missed GList elements.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtk+/glade-model-data.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/gtk+/glade-model-data.c b/plugins/gtk+/glade-model-data.c index 4a0b7d94..6adb389a 100644 --- a/plugins/gtk+/glade-model-data.c +++ b/plugins/gtk+/glade-model-data.c @@ -534,7 +534,7 @@ eprop_model_data_generate_store (GladeEditorProperty *eprop) GtkListStore *store = NULL; GladeModelData *iter_data; GNode *data_tree = NULL, *iter_node, *row_node; - GArray *gtypes = g_array_new (FALSE, TRUE, sizeof (GType)); + GArray *gtypes = NULL; GtkTreeIter iter; gint column_num, row_num; GType index_type = G_TYPE_INT, string_type = G_TYPE_STRING, pointer_type = G_TYPE_POINTER; @@ -546,6 +546,7 @@ eprop_model_data_generate_store (GladeEditorProperty *eprop) return NULL; /* Generate store with tailored column types */ + gtypes = g_array_new (FALSE, TRUE, sizeof (GType)); g_array_append_val (gtypes, index_type); for (iter_node = data_tree->children->children; iter_node; iter_node = iter_node->next) |