From 6e9695525e212466398a269a54bc4d53625673f0 Mon Sep 17 00:00:00 2001 From: Dominique Pelle Date: Thu, 17 Jun 2021 13:53:41 +0200 Subject: [PATCH] patch 8.2.3014: Coverity warns for freeing static string MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Problem: Coverity warns for freeing static string. Solution: Do not assign static string to pointer. (Dominique Pellé, closes #8397) --- src/version.c | 2 ++ src/vim9execute.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/version.c b/src/version.c index 2dff11cd7..99c086f5b 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3014, /**/ 3013, /**/ diff --git a/src/vim9execute.c b/src/vim9execute.c index 33e924424..fabce4dbe 100644 --- 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) -- 2.40.0