mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.1.1897: may free memory twice when out of memory
Problem: May free memory twice when out of memory. Solution: Check that backslash_halve_save() returns a different pointer. (Dominique Pelle, closes #4847)
This commit is contained in:
@@ -4086,7 +4086,9 @@ gen_expand_wildcards(
|
||||
addfile(&ga, t, flags | EW_DIR | EW_FILE);
|
||||
else
|
||||
addfile(&ga, t, flags);
|
||||
vim_free(t);
|
||||
|
||||
if (t != p)
|
||||
vim_free(t);
|
||||
}
|
||||
|
||||
#if defined(FEAT_SEARCHPATH)
|
||||
|
Reference in New Issue
Block a user