summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2021-02-13 11:51:16 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-02-13 11:51:16 +0000
commitf8a98e5bf208a4b17155bda42b3f60295ab90b09 (patch)
tree285bd29ddc84ac5c86dbba44c003b3965673ad57
parentb3a1c400ac00233126e89d0ecdde7bf4e4e5994c (diff)
downloadefl-f8a98e5bf208a4b17155bda42b3f60295ab90b09.tar.gz
gl: remove memory leak of orient_set
Summary: The tex->pt->references is descreased by evas_gl_common_texture_free -> pt_unref if tex->references is 0 And tex->pt->texture is removed by evas_gl_common_texture_free -> pt_unref -> glDeleteTextures if tex->pt->references is 0 The evas_gl_common_texture_free decreases tex->references only if tex->references is bigger than 0. There is no chance to decrease tex->pt->references at this point. So if orient_set increases both references of tex and tex->pt, then the tex->pt->reference is not decreased till tex->references is 0. So do not increase tex->pt->references in eng_orient_set. Reviewers: raster, cedric, Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12243
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index a1c48ae451..021e798169 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -1167,7 +1167,6 @@ eng_image_orient_set(void *engine, void *image, Evas_Image_Orient orient)
{
im_new->tex = im->tex;
im_new->tex->references++;
- im_new->tex->pt->references++;
}
evas_gl_common_image_free(im);