patch 8.2.1899: crash in out-of-memory situation
Problem: Crash in out-of-memory situation.
Solution: Bail out if shell_name is NULL. (Dominique Pellé, closes #7196)
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 1dbd014..82e9c57 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1544,6 +1544,9 @@
int is_fish_shell;
char_u *shell_name = get_isolated_shell_name();
+ if (shell_name == NULL)
+ return NULL;
+
// Account for fish's different syntax for subshells
is_fish_shell = (fnamecmp(shell_name, "fish") == 0);
vim_free(shell_name);