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:
Chris Michael 2014-08-13 10:50:04 -04:00
parent ce5178b204
commit e4372072d0
1 changed files with 1 additions and 1 deletions

View File

@ -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);