From 03acf1bd1e923ff4178b7181d996b6aeaa44caca Mon Sep 17 00:00:00 2001 From: Monsta Date: Mon, 3 Nov 2014 15:15:33 +0300 Subject: don't leak memory --- src/eom-image-jpeg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/eom-image-jpeg.c b/src/eom-image-jpeg.c index 576df36..7eb24f3 100644 --- a/src/eom-image-jpeg.c +++ b/src/eom-image-jpeg.c @@ -89,12 +89,13 @@ fatal_error_handler (j_common_ptr cinfo) * crappy JPEG library */ if (errmgr->error && *errmgr->error == NULL) { + gchar *str = g_path_get_basename (errmgr->filename); g_set_error (errmgr->error, 0, 0, "Error interpreting JPEG image file: %s\n\n%s", - g_path_get_basename (errmgr->filename), - buffer); + str, buffer); + g_free (str); } siglongjmp (errmgr->setjmp_buffer, 1); -- cgit v1.2.1