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 #ifndef USE_ARGV
vim_free(ga.ga_data); vim_free(ga.ga_data);
#endif #endif
if (argv != job->jv_argv) if (argv != NULL && argv != job->jv_argv)
{ {
for (i = 0; argv[i] != NULL; i++) for (i = 0; argv[i] != NULL; i++)
vim_free(argv[i]); vim_free(argv[i]);

View File

@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
143,
/**/ /**/
142, 142,
/**/ /**/