[gimp] app: don't leak references in gimp_session_info_restore_docks()



commit 2fc0c768f172137b13792e26c29357db65060b73
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jan 14 01:36:08 2013 +0100

    app: don't leak references in gimp_session_info_restore_docks()
    
    This should fix quite a bunch of memory leaks.

 app/widgets/gimpsessioninfo.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/app/widgets/gimpsessioninfo.c b/app/widgets/gimpsessioninfo.c
index c62e8b9..dd940c7 100644
--- a/app/widgets/gimpsessioninfo.c
+++ b/app/widgets/gimpsessioninfo.c
@@ -499,16 +499,17 @@ gimp_session_info_restore_docks (GimpRestoreDocksData *data)
                 }
             }
         }
-
-      g_object_unref (dialog);
-      g_object_unref (screen);
-      g_object_unref (factory);
-      g_object_unref (info);
-      g_slice_free (GimpRestoreDocksData, data);
     }
 
   gimp_session_info_clear_info (info);
 
+  g_object_unref (dialog);
+  g_object_unref (screen);
+  g_object_unref (factory);
+  g_object_unref (info);
+
+  g_slice_free (GimpRestoreDocksData, data);
+
   return FALSE;
 }
 



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