[cheese/wip/fixes: 6/8] Fix cheese_thumb_view_append_item() memory leaks



commit 0aa79fe01c7aaddf1ca71d640cb20202ad466777
Author: David King <amigadave amigadave com>
Date:   Tue Nov 5 23:26:13 2013 +0000

    Fix cheese_thumb_view_append_item() memory leaks
    
    Fix several memory leaks found with valgrind.

 src/thumbview/cheese-thumb-view.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/thumbview/cheese-thumb-view.c b/src/thumbview/cheese-thumb-view.c
index a702fc0..34b10c0 100644
--- a/src/thumbview/cheese-thumb-view.c
+++ b/src/thumbview/cheese-thumb-view.c
@@ -243,6 +243,8 @@ cheese_thumb_view_append_item (CheeseThumbView *thumb_view, GFile *file)
           skip = TRUE;
           break;
         }
+
+        g_free (col_filename);
       }
     }
     else
@@ -254,6 +256,10 @@ cheese_thumb_view_append_item (CheeseThumbView *thumb_view, GFile *file)
 
     if (skip) return;
   }
+  else
+  {
+    g_free (filename);
+  }
 
   if (priv->multiplex_thumbnail_generator)
   {
@@ -293,6 +299,7 @@ cheese_thumb_view_append_item (CheeseThumbView *thumb_view, GFile *file)
   path = gtk_tree_model_get_path (GTK_TREE_MODEL (priv->store), &iter);
   gtk_icon_view_scroll_to_path (GTK_ICON_VIEW (thumb_view), path,
                                 TRUE, 1.0, 0.5);
+  gtk_tree_path_free (path);
 
   if (pixbuf) g_object_unref (pixbuf);
 


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