forked from enlightenment/efl
ecore-evas-wayland: Fix case of potential double-free
This patch addresses the case where we failed to allocate 'wdata' and were calling free(ee) before going to an error handler. For the fix, just don't free(ee) here and let the error handling do it's job. Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
7a74a2e176
commit
11ef74c962
|
@ -2048,7 +2048,6 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
|
||||||
if (!(wdata = calloc(1, sizeof(Ecore_Evas_Engine_Wl_Data))))
|
if (!(wdata = calloc(1, sizeof(Ecore_Evas_Engine_Wl_Data))))
|
||||||
{
|
{
|
||||||
ERR("Failed to allocate Ecore_Evas_Engine_Wl_Data");
|
ERR("Failed to allocate Ecore_Evas_Engine_Wl_Data");
|
||||||
free(ee);
|
|
||||||
goto w_err;
|
goto w_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue