summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-07-09 09:41:40 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-07-09 09:41:40 +0900
commitcb0eef29c8d8b4a275d448a4a87352092efddb30 (patch)
treef8288362aac57baf3dfb0763bf00b20f497f95dd /src/modules/evas/engines
parent5933d9d4a3f4f7fe74239c4c1f4fb97e39ef414c (diff)
Evas gl: Fix potential memleak
Fixes CID 1224765. This CID reports a potential memleak in an "assert" situation.
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c7
1 files changed, 4 insertions, 3 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 3bd15a21dc..3d9ac62eb0 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -505,9 +505,6 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
505 lformat = _evas_gl_texture_search_format(im->cache_entry.flags.alpha, gc->shared->info.bgra, im->cache_entry.space); 505 lformat = _evas_gl_texture_search_format(im->cache_entry.flags.alpha, gc->shared->info.bgra, im->cache_entry.space);
506 if (lformat < 0) return NULL; 506 if (lformat < 0) return NULL;
507 507
508 tex = evas_gl_common_texture_alloc(gc, im->cache_entry.w, im->cache_entry.h, im->cache_entry.flags.alpha);
509 if (!tex) return NULL;
510
511 switch (im->cache_entry.space) 508 switch (im->cache_entry.space)
512 { 509 {
513 case EVAS_COLORSPACE_ETC1: 510 case EVAS_COLORSPACE_ETC1:
@@ -535,6 +532,10 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
535 break; 532 break;
536 } 533 }
537 534
535 tex = evas_gl_common_texture_alloc(gc, im->cache_entry.w, im->cache_entry.h,
536 im->cache_entry.flags.alpha);
537 if (!tex) return NULL;
538
538 tex->pt = _pool_tex_find(gc, w, h, 539 tex->pt = _pool_tex_find(gc, w, h,
539 *matching_format[lformat].intformat, 540 *matching_format[lformat].intformat,
540 *matching_format[lformat].format, 541 *matching_format[lformat].format,