# HG changeset patch # User Bram Moolenaar # Date 1623931206 -7200 # Node ID 9b7fac4c70a0417f32b48f65ad38f7e23eca0c28 # Parent 9be0a9b887bf43cf90cbbe595d53609f2bfb3d21 patch 8.2.3014: Coverity warns for freeing static string Commit: https://github.com/vim/vim/commit/6e9695525e212466398a269a54bc4d53625673f0 Author: Dominique Pelle 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) diff --git a/src/version.c b/src/version.c --- 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 --- 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)