diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-08-22 00:49:33 -0400 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2019-08-22 06:49:33 +0200 |
commit | ed28668392e450bf22fe97e0581a63135498b8c0 (patch) | |
tree | f2590a2bfdbb9e54e386d9f6fa913b9deccf87b8 /src/nvim/os/env.c | |
parent | bb50eadc84a4d095b1739ad31720fafe7bca6d0f (diff) | |
download | rneovim-ed28668392e450bf22fe97e0581a63135498b8c0.tar.gz rneovim-ed28668392e450bf22fe97e0581a63135498b8c0.tar.bz2 rneovim-ed28668392e450bf22fe97e0581a63135498b8c0.zip |
vim-patch:8.1.1897: may free memory twice when out of memory (#10827)
Problem: May free memory twice when out of memory.
Solution: Check that backslash_halve_save() returns a different pointer.
(Dominique Pelle, closes vim/vim#4847)
https://github.com/vim/vim/commit/f1552d07d715b437d941659479942c2543b02bd4
Diffstat (limited to 'src/nvim/os/env.c')
-rw-r--r-- | src/nvim/os/env.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c index 669475fa72..f5dbf0694e 100644 --- a/src/nvim/os/env.c +++ b/src/nvim/os/env.c @@ -412,6 +412,7 @@ void expand_env_esc(char_u *restrict srcp, bool esc, bool one, char_u *prefix) + FUNC_ATTR_NONNULL_ARG(1, 2) { char_u *tail; char_u *var; |