diff options
author | Monsta <[email protected]> | 2014-11-03 15:15:33 +0300 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-23 13:57:32 +0100 |
commit | 03acf1bd1e923ff4178b7181d996b6aeaa44caca (patch) | |
tree | 0015011d6bd66dcb73bbbd016c5540b6f903e574 /src | |
parent | d239e3a08cf1e6a437976c3f5b3206a30ef33e67 (diff) | |
download | eom-03acf1bd1e923ff4178b7181d996b6aeaa44caca.tar.bz2 eom-03acf1bd1e923ff4178b7181d996b6aeaa44caca.tar.xz |
don't leak memory
Diffstat (limited to 'src')
-rw-r--r-- | src/eom-image-jpeg.c | 5 |
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); |