changeset 19168:c9258281045d v8.2.0143

patch 8.2.0143: Coverity warning for possible use of NULL pointer Commit: https://github.com/vim/vim/commit/81c3ea7496cbca2be12bf74a17575ff684343579 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 23 15:48:42 2020 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 23 Jan 2020 16:00:04 +0100
parents f12b0d65dd15
children cc6d4aa341fd
files src/channel.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -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]);
--- a/src/version.c
+++ b/src/version.c
@@ -743,6 +743,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    143,
+/**/
     142,
 /**/
     141,