svnno****@sourc*****
svnno****@sourc*****
Tue Feb 26 03:56:39 JST 2008
Revision: 3400 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3400 Author: pal_gene Date: 2008-02-26 03:56:39 +0900 (Tue, 26 Feb 2008) Log Message: ----------- *Don't leak when failed create GdkPixbuf modified: module/embed/gecko/kz-mozthumbnailer.cpp Modified Paths: -------------- kazehakase/trunk/module/embed/gecko/kz-mozthumbnailer.cpp Modified: kazehakase/trunk/module/embed/gecko/kz-mozthumbnailer.cpp =================================================================== --- kazehakase/trunk/module/embed/gecko/kz-mozthumbnailer.cpp 2008-02-25 18:56:35 UTC (rev 3399) +++ kazehakase/trunk/module/embed/gecko/kz-mozthumbnailer.cpp 2008-02-25 18:56:39 UTC (rev 3400) @@ -97,6 +97,7 @@ if (!loader) return FALSE; gdk_pixbuf_loader_write(loader, (const guchar *)imgData, (gsize)imgSize, NULL); + g_free(imgData); GdkPixbuf *thumbnail = gdk_pixbuf_loader_get_pixbuf(loader); gdk_pixbuf_loader_close(loader, NULL); @@ -106,8 +107,6 @@ KZ_CREATE_THUMBNAIL(thumbnail, uri, last_modified, size); g_object_unref(thumbnail); - - g_free(imgData); return TRUE; }