summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2014-11-03 15:15:33 +0300
committerinfirit <[email protected]>2014-12-23 13:57:32 +0100
commit03acf1bd1e923ff4178b7181d996b6aeaa44caca (patch)
tree0015011d6bd66dcb73bbbd016c5540b6f903e574
parentd239e3a08cf1e6a437976c3f5b3206a30ef33e67 (diff)
downloadeom-03acf1bd1e923ff4178b7181d996b6aeaa44caca.tar.bz2
eom-03acf1bd1e923ff4178b7181d996b6aeaa44caca.tar.xz
don't leak memory
-rw-r--r--src/eom-image-jpeg.c5
1 files 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);