mirror of
https://github.com/vim/vim.git
synced 2025-10-13 06:54:15 -04:00
patch 8.1.2107: various memory leaks reported by asan
Problem: Various memory leaks reported by asan. Solution: Free the memory. (Ozaki Kiichi, closes #5003)
This commit is contained in:
@@ -2213,8 +2213,7 @@ f_expand(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
if (rettv_list_alloc(rettv) != FAIL && result != NULL)
|
||||
list_append_string(rettv->vval.v_list, result, -1);
|
||||
else
|
||||
vim_free(result);
|
||||
vim_free(result);
|
||||
}
|
||||
else
|
||||
rettv->vval.v_string = result;
|
||||
|
Reference in New Issue
Block a user