xwayland: Check zalloc return for out of memory situation
authorBryce W. Harrington <b.harrington@samsung.com>
Mon, 21 Apr 2014 23:51:03 +0000 (23:51 +0000)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 25 Apr 2014 20:20:10 +0000 (13:20 -0700)
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
xwayland/launcher.c

index ac692de..70703a4 100644 (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;