0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.4472: Coverity warns for use of a freed function name

Problem:    Coverity warns for use of a freed function name.
Solution:   Only check an autoload name when is prefixed.
This commit is contained in:
Bram Moolenaar
2022-02-25 21:35:17 +00:00
parent 62628d97c4
commit 9383a3afb6
2 changed files with 3 additions and 1 deletions

View File

@@ -4624,7 +4624,7 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
{
char_u *prefixed = may_prefix_autoload(name);
if (prefixed != NULL)
if (prefixed != NULL && prefixed != name)
{
v = find_var(prefixed, &ht, TRUE);
if (v != NULL)