[gimp] app: fix more leaks in gimp_image_merge_layers()
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix more leaks in gimp_image_merge_layers()
- Date: Sun, 23 Apr 2017 15:08:39 +0000 (UTC)
commit 3ae9c12623b1c55a9bbb754c2d5ecea9335ca9e8
Author: Ell <ell_se yahoo com>
Date: Sun Apr 23 11:07:22 2017 -0400
app: fix more leaks in gimp_image_merge_layers()
app/core/gimpimage-merge.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpimage-merge.c b/app/core/gimpimage-merge.c
index 236e99c..bc8ec4b 100644
--- a/app/core/gimpimage-merge.c
+++ b/app/core/gimpimage-merge.c
@@ -536,7 +536,11 @@ gimp_image_merge_layers (GimpImage *image,
GIMP_LAYER_MODE_NORMAL_LEGACY);
if (! merge_layer)
{
- g_warning ("%s: could not allocate merge layer.", G_STRFUNC);
+ g_warning ("%s: could not allocate merge layer", G_STRFUNC);
+
+ g_free (name);
+ g_slist_free (reverse_list);
+
return NULL;
}
@@ -568,9 +572,13 @@ gimp_image_merge_layers (GimpImage *image,
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL_LEGACY);
- if (!merge_layer)
+ if (! merge_layer)
{
g_warning ("%s: could not allocate merge layer", G_STRFUNC);
+
+ g_free (name);
+ g_slist_free (reverse_list);
+
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]