Evas gl: Fix potential memleak

Fixes CID 1224765.
This CID reports a potential memleak in an "assert" situation.
This commit is contained in:
Jean-Philippe Andre 2014-07-09 09:41:40 +09:00
parent 5933d9d4a3
commit cb0eef29c8
1 changed files with 4 additions and 3 deletions

View File

@ -505,9 +505,6 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
lformat = _evas_gl_texture_search_format(im->cache_entry.flags.alpha, gc->shared->info.bgra, im->cache_entry.space);
if (lformat < 0) return NULL;
tex = evas_gl_common_texture_alloc(gc, im->cache_entry.w, im->cache_entry.h, im->cache_entry.flags.alpha);
if (!tex) return NULL;
switch (im->cache_entry.space)
{
case EVAS_COLORSPACE_ETC1:
@ -535,6 +532,10 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
break;
}
tex = evas_gl_common_texture_alloc(gc, im->cache_entry.w, im->cache_entry.h,
im->cache_entry.flags.alpha);
if (!tex) return NULL;
tex->pt = _pool_tex_find(gc, w, h,
*matching_format[lformat].intformat,
*matching_format[lformat].format,