Mercurial > vim
comparison src/vim9execute.c @ 26325:c189c40c9a22 v8.2.3693
patch 8.2.3693: Coverity warns for possibly using a NULL pointer
Commit: https://github.com/vim/vim/commit/293eb9ba4669b1500370502397d399681e7098f0
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 29 10:36:19 2021 +0000
patch 8.2.3693: Coverity warns for possibly using a NULL pointer
Problem: Coverity warns for possibly using a NULL pointer.
Solution: Check for NULL and give an error.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 29 Nov 2021 11:45:03 +0100 |
parents | 3841da4eac23 |
children | a3a0885d9dd8 |
comparison
equal
deleted
inserted
replaced
26324:a694e1ebf777 | 26325:c189c40c9a22 |
---|---|
3187 } | 3187 } |
3188 else | 3188 else |
3189 { | 3189 { |
3190 ufunc = find_func(funcref->fr_func_name, FALSE, NULL); | 3190 ufunc = find_func(funcref->fr_func_name, FALSE, NULL); |
3191 } | 3191 } |
3192 if (ufunc == NULL) | |
3193 { | |
3194 SOURCING_LNUM = iptr->isn_lnum; | |
3195 emsg(_(e_function_reference_invalid)); | |
3196 goto theend; | |
3197 } | |
3192 if (fill_partial_and_closure(pt, ufunc, ectx) == FAIL) | 3198 if (fill_partial_and_closure(pt, ufunc, ectx) == FAIL) |
3193 goto theend; | 3199 goto theend; |
3194 tv = STACK_TV_BOT(0); | 3200 tv = STACK_TV_BOT(0); |
3195 ++ectx->ec_stack.ga_len; | 3201 ++ectx->ec_stack.ga_len; |
3196 tv->vval.v_partial = pt; | 3202 tv->vval.v_partial = pt; |