[PATCH 2/3] xwayland: Check zalloc return for out of memory situation
Bryce W. Harrington
b.harrington at samsung.com
Mon Apr 21 16:51:03 PDT 2014
Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
---
xwayland/launcher.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xwayland/launcher.c b/xwayland/launcher.c
index ac692de..70703a4 100644
--- a/xwayland/launcher.c
+++ b/xwayland/launcher.c
@@ -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;
--
1.7.9.5
More information about the wayland-devel
mailing list