1
0
forked from aniani/vim

patch 8.2.0143: Coverity warning for possible use of NULL pointer

Problem:    Coverity warning for possible use of NULL pointer.
Solution:   Check argv is not NULL.
This commit is contained in:
Bram Moolenaar
2020-01-23 15:48:42 +01:00
parent 8bf716cdba
commit 81c3ea7496
2 changed files with 3 additions and 1 deletions

View File

@@ -5993,7 +5993,7 @@ theend:
#ifndef USE_ARGV
vim_free(ga.ga_data);
#endif
if (argv != job->jv_argv)
if (argv != NULL && argv != job->jv_argv)
{
for (i = 0; argv[i] != NULL; i++)
vim_free(argv[i]);