changeset 24954:9b7fac4c70a0 v8.2.3014

patch 8.2.3014: Coverity warns for freeing static string Commit: https://github.com/vim/vim/commit/6e9695525e212466398a269a54bc4d53625673f0 Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Thu Jun 17 13:53:41 2021 +0200 patch 8.2.3014: Coverity warns for freeing static string Problem: Coverity warns for freeing static string. Solution: Do not assign static string to pointer. (Dominique Pell?, closes #8397)
author Bram Moolenaar <Bram@vim.org>
date Thu, 17 Jun 2021 14:00:06 +0200
parents 9be0a9b887bf
children 04373d30ea32
files src/version.c src/vim9execute.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    3014,
+/**/
     3013,
 /**/
     3012,
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1469,10 +1469,8 @@ handle_debug(isn_T *iptr, ectx_T *ectx)
     }
     else
 	line = ((char_u **)ufunc->uf_lines.ga_data)[iptr->isn_lnum - 1];
-    if (line == NULL)
-	line = (char_u *)"[empty]";
-
-    do_debug(line);
+
+    do_debug(line == NULL ? (char_u *)"[empty]" : line);
     debug_context = NULL;
 
     if (end_lnum > iptr->isn_lnum)