From: Bram Moolenaar Date: Fri, 25 Feb 2022 21:35:17 +0000 (+0000) Subject: patch 8.2.4472: Coverity warns for use of a freed function name X-Git-Tag: v8.2.4472 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9383a3afb6a2b7ba6a2739a66a68cc8e1162f389;p=thirdparty%2Fvim.git 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. --- diff --git a/src/userfunc.c b/src/userfunc.c index ed2fb8668c..03b310d67b 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -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) diff --git a/src/version.c b/src/version.c index 1531a9c18b..e0384c8ef0 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4472, /**/ 4471, /**/