forked from enlightenment/efl
Evas: Free variable in error path
Fixes CID 1270032 Resource leaks (RESOURCE_LEAK) Variable "exim" going out of scope leaks the storage it points to.
This commit is contained in:
parent
38f1f9c5f2
commit
968751f835
|
@ -86,16 +86,17 @@ evas_xlib_image_native_set(void *data, void *image, void *native)
|
|||
w = im->cache_entry.w;
|
||||
h = im->cache_entry.h;
|
||||
|
||||
n = calloc(1, sizeof(Native));
|
||||
if (!n) return NULL;
|
||||
|
||||
exim = ecore_x_image_new(w, h, vis, depth);
|
||||
if (!exim)
|
||||
{
|
||||
ERR("ecore_x_image_new failed.");
|
||||
free(n);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
n = calloc(1, sizeof(Native));
|
||||
if (!n) return NULL;
|
||||
|
||||
memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface));
|
||||
n->pixmap = pm;
|
||||
n->visual = vis;
|
||||
|
|
Loading…
Reference in New Issue