summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Vrac <avrac@freebox.fr>2014-08-25 20:56:46 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2014-08-27 16:57:55 +0300
commit4263119d0273dd747732d4357a91fe2852fd53f3 (patch)
tree3d93ad3d38165db83aaaaeb01a96a377d2612203
parent3c40f368eb662299ac4cf17f15f6cb8487ce081d (diff)
downloadweston-4263119d0273dd747732d4357a91fe2852fd53f3.tar.gz
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 <pekka.paalanen@collabora.co.uk>
-rw-r--r--desktop-shell/shell.c4
1 files changed, 3 insertions, 1 deletions
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;