app: fix more leaks in gimp_image_merge_layers()

This commit is contained in:
Ell 2017-04-23 11:07:22 -04:00
parent 3f7b135a2a
commit 3ae9c12623
1 changed files with 10 additions and 2 deletions

View File

@ -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;
}