comparison src/userfunc.c @ 27482:14640c6fe1fe v8.2.4269

patch 8.2.4269: Coverity warns for using a NULL pointer Commit: https://github.com/vim/vim/commit/48a604845e33399893d6bf293e71bcd2a412800d Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 31 11:44:48 2022 +0000 patch 8.2.4269: Coverity warns for using a NULL pointer Problem: Coverity warns for using a NULL pointer. Solution: Check for "name" to not be NULL.
author Bram Moolenaar <Bram@vim.org>
date Mon, 31 Jan 2022 12:45:05 +0100
parents 4f1cf9579e4e
children a54064e14114
comparison
equal deleted inserted replaced
27481:c810c6709c5a 27482:14640c6fe1fe
4230 { 4230 {
4231 vim_free(name); 4231 vim_free(name);
4232 name = prefixed; 4232 name = prefixed;
4233 } 4233 }
4234 } 4234 }
4235 else if (vim9script && vim_strchr(name, AUTOLOAD_CHAR) != NULL) 4235 else if (vim9script && name != NULL
4236 && vim_strchr(name, AUTOLOAD_CHAR) != NULL)
4236 { 4237 {
4237 emsg(_(e_cannot_use_name_with_hash_in_vim9_script_use_export_instead)); 4238 emsg(_(e_cannot_use_name_with_hash_in_vim9_script_use_export_instead));
4238 goto ret_free; 4239 goto ret_free;
4239 } 4240 }
4240 } 4241 }