evas: fix use after free.

Thanks to Thanatermesis for tracking this in T2135.
This commit is contained in:
Cedric BAIL 2015-03-24 23:09:28 +01:00
parent f0d0533c42
commit dd6db2b603
1 changed files with 3 additions and 1 deletions

View File

@ -770,9 +770,11 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
{
Image_Entry *ie;
if (!im->im) return;
ie = &im->im->cache_entry;
evas_gl_common_image_alloc_ensure(im);
// alloc ensure can change im->im, so only get the local variable later.
ie = &im->im->cache_entry;
/*
if ((im->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
(im->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL))