[Rawstudio-dev] [patch] fix warning
rafael.espindola at gmail.com
Sat May 24 00:31:34 CEST 2008
> 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?
No, the problem is that the name is being passed to gdk_pixbuf_save
after being freed. My previous patch would replace the invalid memory
access with a memory leak.
I have attached one that should fix the problem without adding a leak.
It is ugly. It might be possible to split the function or add a "goto
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 722 bytes
Desc: not available
Url : http://rawstudio.org/pipermail/rawstudio-dev/attachments/20080523/e58515de/tiff.bin
More information about the Rawstudio-dev