1
0
forked from aniani/vim

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:
Bram Moolenaar
2019-08-21 12:54:18 +02:00
parent eaf3524119
commit f1552d07d7
3 changed files with 10 additions and 4 deletions

View File

@@ -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)