raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8845ecb2b2bca5c0db018a89630bd256dc5eef3e

commit 8845ecb2b2bca5c0db018a89630bd256dc5eef3e
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Tue Aug 12 17:25:15 2014 +0900

    evas gl common - fix potential invalid access during texture free
    
    this should address CID 1223507
---
 src/modules/evas/engines/gl_common/evas_gl_texture.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c 
b/src/modules/evas/engines/gl_common/evas_gl_texture.c
index 44c86ab..ec1255c 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -1394,25 +1394,25 @@ evas_gl_common_texture_free(Evas_GL_Texture *tex, 
Eina_Bool force EINA_UNUSED)
    if (tex->pt)
      {
         tex->pt->allocations = eina_list_remove(tex->pt->allocations, 
tex->apt);
-        if (tex->apt)
-          eina_rectangle_pool_release(tex->apt);
+        if (tex->apt) eina_rectangle_pool_release(tex->apt);
         tex->apt = NULL;
         pt_unref(tex->pt);
+        tex->pt = NULL;
      }
    if (tex->ptt)
      {
         tex->ptt->allocations = eina_list_remove(tex->ptt->allocations, 
tex->aptt);
-        if (tex->aptt)
-          eina_rectangle_pool_release(tex->aptt);
+        if (tex->aptt) eina_rectangle_pool_release(tex->aptt);
         tex->aptt = NULL;
         pt_unref(tex->ptt);
+        tex->ptt = NULL;
      }
-   if (tex->ptu)
-     pt_unref(tex->ptu);
-   if (tex->ptv)
-     pt_unref(tex->ptv);
-   if (tex->ptuv)
-     pt_unref(tex->ptuv);
+   if (tex->ptu) pt_unref(tex->ptu);
+   if (tex->ptv) pt_unref(tex->ptv);
+   if (tex->ptuv) pt_unref(tex->ptuv);
+   tex->ptu = NULL;
+   tex->ptv = NULL;
+   tex->ptuv = NULL;
 
    evas_gl_common_texture_light_free(tex);
 }

-- 


Reply via email to