plug-ins: fix file-exr warning and a possible memory leak
This commit is contained in:
parent
8287302b50
commit
1a144f35a6
2 changed files with 5 additions and 2 deletions
|
|
@ -306,6 +306,9 @@ load_image (GFile *file,
|
|||
gimp_image_get_default_new_layer_mode (image));
|
||||
gimp_image_insert_layer (image, layer, NULL, -1);
|
||||
|
||||
if (i > -1)
|
||||
g_free (layer_name);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (layer));
|
||||
format = gimp_drawable_get_format (GIMP_DRAWABLE (layer));
|
||||
bpp = babl_format_get_bytes_per_pixel (format);
|
||||
|
|
|
|||
|
|
@ -469,8 +469,8 @@ struct _EXRLoader
|
|||
channels_.layers (layerNames);
|
||||
|
||||
name = *std::next(layerNames.begin(), index);
|
||||
result = (gchar *) g_memdup2 (name.c_str () + '\0',
|
||||
strlen (name.c_str ()) + 1);
|
||||
result = (gchar *) g_memdup2 (name.c_str(),
|
||||
name.size() + 1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue