[gimp/multi-stroke: 8/31] app: GeglBuffer leaked on XCF load.



commit 5e95c85a4b0212a5fe5047facfd365330694708e
Author: Jehan <jehan girinstud io>
Date:   Sat Mar 21 19:22:20 2015 +0100

    app: GeglBuffer leaked on XCF load.

 app/xcf/xcf-load.c |    3 +++
 app/xcf/xcf-save.c |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index f156695..65ab270 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -760,6 +760,7 @@ xcf_load_image_props (XcfInfo   *info,
                     }
                   mstroke = gimp_multi_stroke_new (type, image);
                   gimp_image_add_multi_stroke (image, mstroke);
+                  g_object_unref (mstroke);
 
                   settings = gimp_multi_stroke_get_xcf_settings (mstroke,
                                                                  &nsettings);
@@ -844,6 +845,8 @@ xcf_load_image_props (XcfInfo   *info,
                           return FALSE;
                         }
                     }
+                  g_free (settings);
+
                   if (active == i)
                     active_mstroke = mstroke;
                 }
diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c
index bdd0659..114a05a 100644
--- a/app/xcf/xcf-save.c
+++ b/app/xcf/xcf-save.c
@@ -1051,6 +1051,7 @@ xcf_save_prop (XcfInfo    *info,
                     return FALSE;
                   }
               }
+            g_free (settings);
           }
 
         size = info->cp - base;



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