forked from enlightenment/efl
ecore-wayland: Check return of calloc
Calloc 'can' fail so lets check the return and make sure 'global' is valid else we will segfault. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
ce5178b204
commit
e4372072d0
|
@ -617,7 +617,7 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
|
|||
|
||||
ewd = data;
|
||||
|
||||
global = calloc(1, sizeof(Ecore_Wl_Global));
|
||||
if (!(global = calloc(1, sizeof(Ecore_Wl_Global)))) return;
|
||||
|
||||
global->id = id;
|
||||
global->interface = strdup(interface);
|
||||
|
|
Loading…
Reference in New Issue