[gimp/gimp-2-10] plug-ins: fix memory leak in HEIF import/export
- From: Daniel Novomeský <dnovomesky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] plug-ins: fix memory leak in HEIF import/export
- Date: Fri, 29 Oct 2021 12:32:23 +0000 (UTC)
commit a2e520bf2210bec32abcac7baf470ca6a8655b1e
Author: Daniel Novomesky <dnovomesky gmail com>
Date: Fri Oct 29 13:53:09 2021 +0200
plug-ins: fix memory leak in HEIF import/export
plug-ins/common/file-heif.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/file-heif.c b/plug-ins/common/file-heif.c
index d56356822b..80804029a4 100644
--- a/plug-ins/common/file-heif.c
+++ b/plug-ins/common/file-heif.c
@@ -692,9 +692,11 @@ load_image (GFile *file,
GimpPrecision precision;
gboolean load_linear;
const char *encoding;
+ char *filename = g_file_get_parse_name (file);
gimp_progress_init_printf (_("Opening '%s'"),
- g_file_get_parse_name (file));
+ filename);
+ g_free (filename);
file_size = get_file_size (file, error);
if (file_size <= 0)
@@ -1259,6 +1261,7 @@ save_image (GFile *file,
gint height;
gboolean has_alpha;
gboolean out_linear = FALSE;
+ char *filename;
if (!context)
{
@@ -1309,8 +1312,10 @@ save_image (GFile *file,
}
}
+ filename = g_file_get_parse_name (file);
gimp_progress_init_printf (_("Exporting '%s' using %s encoder"),
- g_file_get_parse_name (file), encoder_name);
+ filename, encoder_name);
+ g_free (filename);
width = gimp_drawable_width (drawable_ID);
height = gimp_drawable_height (drawable_ID);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]