Hi,
On Fri, 2008-05-02 at 01:04 +0100, Rafael Espíndola wrote:
> if (g_file_test(thumbname, G_FILE_TEST_EXISTS))
> {
> pixbuf = gdk_pixbuf_new_from_file(thumbname,
> NULL);
> - g_free(thumbname);
> - if (pixbuf) return(pixbuf);
> + if (pixbuf)
> + {
> + g_free(thumbname);
> + return(pixbuf);
> + }
> }
> }
This doesn't look right to me. Why wouldn't you only free thumbname when
pixbuf is non-NULL?
It seems to me, that the right fix, would be to move g_free(thumbname)
out of the g_file_text()-if?
Patch attached.
/abrander
Index: tiff-meta.c
===================================================================
--- tiff-meta.c (revision 1858)
+++ tiff-meta.c (working copy)
@@ -619,11 +619,9 @@
if (thumbname)
{
if (g_file_test(thumbname, G_FILE_TEST_EXISTS))
- {
pixbuf = gdk_pixbuf_new_from_file(thumbname, NULL);
- g_free(thumbname);
- if (pixbuf) return(pixbuf);
- }
+ g_free(thumbname);
+ if (pixbuf) return(pixbuf);
}
if (!(rawfile = raw_open_file(src)))
_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev