diff options
author | Dominique Pelle <dominique.pelle@gmail.com> | 2021-06-17 13:53:41 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-17 13:53:41 +0200 |
commit | 6e9695525e212466398a269a54bc4d53625673f0 (patch) | |
tree | e1e064659e9066b18c21b292e0464d1fc5c89411 | |
parent | 4cea536bdf48df459e7ad651dfee006844bbf2c0 (diff) |
patch 8.2.3014: Coverity warns for freeing static stringv8.2.3014
Problem: Coverity warns for freeing static string.
Solution: Do not assign static string to pointer. (Dominique Pellé,
closes #8397)
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9execute.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/version.c b/src/version.c index 2dff11cd7a..99c086f5b5 100644 --- 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, diff --git a/src/vim9execute.c b/src/vim9execute.c index 33e9244245..fabce4dbe7 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) |