Fix issues found by Coverity, closes #206.

This commit is contained in:
Ahsan Fayaz
2020-07-17 18:55:00 +01:00
parent f6c68cd6de
commit 510a0a6ae2
3 changed files with 36 additions and 20 deletions

View File

@@ -224,7 +224,8 @@ char *game_mode_resolve_wine_preloader(const char *exe, const pid_t pid)
goto fail;
error_cleanup:
game_mode_close_proc(proc_fd);
if (proc_fd != INVALID_PROCFD)
game_mode_close_proc(proc_fd);
free(wineprefix);
return wine_exe;