Enlightenment CVS committal Author : devilhorns Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common Modified Files: evas_image_main.c Log Message: Be a little more paranoid about freeing image data by adding some missing checks for valid im->cs.data and im->image->data before trying to compare them. =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_image_main.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -3 -r1.40 -r1.41 --- evas_image_main.c 17 Dec 2006 15:48:50 -0000 1.40 +++ evas_image_main.c 19 Dec 2006 23:51:44 -0000 1.41 @@ -267,10 +267,18 @@ { im->ref--; if (im->ref > 0) return; - if (im->cs.data != im->image->data) + if ((im->cs.data) && (im->image->data)) + { + if (im->cs.data != im->image->data) + { + if (!im->cs.no_free) free(im->cs.data); + } + } + else if (im->cs.data) { if (!im->cs.no_free) free(im->cs.data); } + im->cs.data = NULL; evas_common_pipe_free(im); if (im->image) evas_common_image_surface_free(im->image); ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs