diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-11-12 15:53:41 -0500 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-11-12 16:21:15 -0500 |
commit | 39b0e7d240c6638bb2e869062ba90468c4983f69 (patch) | |
tree | 11b00322ef246be74ca555836f8df69d96bc7680 | |
parent | 95ec145831d862f8c3279872b4fdb3ba8db97097 (diff) | |
download | nautilus-39b0e7d240c6638bb2e869062ba90468c4983f69.tar.gz |
query-editor: plug a leak
We weren't freeing the row list and all the row structs.
-rw-r--r-- | src/nautilus-query-editor.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c index ca1013f17..b9fecd327 100644 --- a/src/nautilus-query-editor.c +++ b/src/nautilus-query-editor.c @@ -238,6 +238,13 @@ nautilus_query_editor_handle_event (NautilusQueryEditor *editor, } static void +row_destroy (NautilusQueryEditorRow *row) +{ + gtk_widget_destroy (row->toolbar); + g_free (row); +} + +static void nautilus_query_editor_dispose (GObject *object) { NautilusQueryEditor *editor; @@ -251,6 +258,9 @@ nautilus_query_editor_dispose (GObject *object) g_clear_object (&editor->details->query); + g_list_free_full (editor->details->rows, (GDestroyNotify) row_destroy); + editor->details->rows = NULL; + G_OBJECT_CLASS (nautilus_query_editor_parent_class)->dispose (object); } @@ -856,13 +866,6 @@ get_next_free_type (NautilusQueryEditor *editor) } static void -row_destroy (NautilusQueryEditorRow *row) -{ - gtk_widget_destroy (row->toolbar); - g_free (row); -} - -static void remove_row_cb (GtkButton *clicked_button, NautilusQueryEditorRow *row) { NautilusQueryEditor *editor; |