xwayland: Check zalloc return for out of memory situation

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
This commit is contained in:
Bryce W. Harrington 2014-04-21 23:51:03 +00:00 committed by Kristian Høgsberg
parent bfd74f40f3
commit a212cbb0e6

View file

@ -348,6 +348,8 @@ module_init(struct weston_compositor *compositor,
char lockfile[256], display_name[8];
wxs = zalloc(sizeof *wxs);
if (wxs == NULL)
return -1;
wxs->process.cleanup = weston_xserver_cleanup;
wxs->wl_display = display;
wxs->compositor = compositor;