mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.4990: memory leak when :defcompile fails
Problem: Memory leak when :defcompile fails. Solution: Free fname when returning early.
This commit is contained in:
@@ -5037,6 +5037,7 @@ find_func_by_name(char_u *name, compiletype_T *compile_type)
|
||||
}
|
||||
if (!ends_excmd2(name, arg))
|
||||
{
|
||||
vim_free(fname);
|
||||
emsg(ex_errmsg(e_trailing_characters_str, arg));
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user