[easytag/wip/musicbrainz-support-merge: 1/3] Fixed Memory leaks with mbentityview.c



commit 2c9661e4c204ac8e6a2737b23e9afa0fd64d8a7e
Author: Abhinav <abhijangda hotmail com>
Date:   Wed Aug 13 19:47:57 2014 +0530

    Fixed Memory leaks with mbentityview.c

 src/mbentityview.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/mbentityview.c b/src/mbentityview.c
index 7ba4438..fdd7e5c 100644
--- a/src/mbentityview.c
+++ b/src/mbentityview.c
@@ -682,9 +682,11 @@ search_in_levels_callback (GObject *source, GAsyncResult *res,
                                   GTK_WIDGET (active_child->data));
         }
     
+        g_list_free (children);
         toggle_btn = insert_togglebtn_in_breadcrumb (GTK_BOX (priv->bread_crumb_box));
         children = gtk_container_get_children (GTK_CONTAINER (priv->bread_crumb_box));
         priv->bread_crumb_nodes[g_list_length (children) - 1] = thread_data->child;
+        g_list_free (children);
         prev_active_toggle_btn = priv->active_toggle_button;
         priv->active_toggle_button = toggle_btn;
 
@@ -701,6 +703,7 @@ search_in_levels_callback (GObject *source, GAsyncResult *res,
         gtk_tree_model_get (priv->list_store, &thread_data->iter, 0,
                             &entity_name, -1);
         gtk_button_set_label (GTK_BUTTON (toggle_btn), entity_name);
+        g_free (entity_name);
         gtk_widget_show_all (GTK_WIDGET (priv->bread_crumb_box));
     }
 
@@ -1311,9 +1314,16 @@ et_mb_entity_view_clear_all (EtMbEntityView *entity_view)
 static void
 et_mb_entity_view_finalize (GObject *object)
 {
+    EtMbEntityViewPrivate *priv;
+    EtMbEntityView *entity_view;
+
+    entity_view = ET_MB_ENTITY_VIEW (object);
+    priv = ET_MB_ENTITY_VIEW_GET_PRIVATE (entity_view);
+
     g_return_if_fail (object != NULL);
     g_return_if_fail (IS_ET_MB_ENTITY_VIEW(object));
 
+    g_object_unref (priv->list_store);
     G_OBJECT_CLASS (et_mb_entity_view_parent_class)->finalize(object);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]