Evas gl: Fix potential memleak
Fixes CID 1224765. This CID reports a potential memleak in an "assert" situation.
This commit is contained in:
parent
5933d9d4a3
commit
cb0eef29c8
|
@ -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);
|
lformat = _evas_gl_texture_search_format(im->cache_entry.flags.alpha, gc->shared->info.bgra, im->cache_entry.space);
|
||||||
if (lformat < 0) return NULL;
|
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)
|
switch (im->cache_entry.space)
|
||||||
{
|
{
|
||||||
case EVAS_COLORSPACE_ETC1:
|
case EVAS_COLORSPACE_ETC1:
|
||||||
|
@ -535,6 +532,10 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
|
||||||
break;
|
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,
|
tex->pt = _pool_tex_find(gc, w, h,
|
||||||
*matching_format[lformat].intformat,
|
*matching_format[lformat].intformat,
|
||||||
*matching_format[lformat].format,
|
*matching_format[lformat].format,
|
||||||
|
|
Loading…
Reference in New Issue