From 2a0c6e70982ec5c357f400352cbd847510aee70b Mon Sep 17 00:00:00 2001 From: Kai Krakow Date: Wed, 3 Oct 2018 02:51:33 +0200 Subject: [PATCH] gamemode: Never add NULL to the client list When running wine games, there's good chance the executable is already gone when GameMode decided to add it to the list. Let's silently bail out here. It probably grabs a non-matching PID anyway in this moment. Signed-off-by: Kai Krakow --- daemon/gamemode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/gamemode.c b/daemon/gamemode.c index dc0465a..961d187 100644 --- a/daemon/gamemode.c +++ b/daemon/gamemode.c @@ -455,6 +455,8 @@ bool game_mode_context_register(GameModeContext *self, pid_t client) return false; } cl->executable = game_mode_context_find_exe(client); + if (!cl->executable) + goto error_cleanup; if (game_mode_context_has_client(self, client)) { LOG_ERROR("Addition requested for already known process [%d]\n", client);