[gimp] Plug memleak found by Nelson A. de Oliveira



commit e466da861638571ac22ba3e37f8b99d7d72bf846
Author: Michael Natterer <mitch gimp org>
Date:   Thu Nov 19 14:40:25 2009 +0100

    Plug memleak found by Nelson A. de Oliveira

 app/actions/dockable-commands.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/app/actions/dockable-commands.c b/app/actions/dockable-commands.c
index 9696d35..38674d1 100644
--- a/app/actions/dockable-commands.c
+++ b/app/actions/dockable-commands.c
@@ -152,14 +152,20 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
           substring = strstr (identifier, "grid");
 
           if (substring && view_type == GIMP_VIEW_TYPE_GRID)
-            return;
+            {
+              g_free (identifier);
+              return;
+            }
 
           if (! substring)
             {
               substring = strstr (identifier, "list");
 
               if (substring && view_type == GIMP_VIEW_TYPE_LIST)
-                return;
+                {
+                  g_free (identifier);
+                  return;
+                }
             }
 
           if (substring)



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