From 4263119d0273dd747732d4357a91fe2852fd53f3 Mon Sep 17 00:00:00 2001 From: Arnaud Vrac Date: Mon, 25 Aug 2014 20:56:46 +0200 Subject: [PATCH] desktop-shell: fix invalid memory access when shell execution fails In this case wl_client_add_destroy_listener() was called with a NULL client, which is invalid. Reviewed-by: Pekka Paalanen --- desktop-shell/shell.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index c8a9f010..5a60086d 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -5349,8 +5349,10 @@ launch_desktop_shell_process(void *data) shell->client, desktop_shell_sigchld); - if (!shell->child.client) + if (!shell->child.client) { weston_log("not able to start %s\n", shell->client); + return; + } shell->child.client_destroy_listener.notify = desktop_shell_client_destroy;