mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
4cea536bdf
commit
6e9695525e
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3014,
|
||||||
/**/
|
/**/
|
||||||
3013,
|
3013,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -1469,10 +1469,8 @@ handle_debug(isn_T *iptr, ectx_T *ectx)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
line = ((char_u **)ufunc->uf_lines.ga_data)[iptr->isn_lnum - 1];
|
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;
|
debug_context = NULL;
|
||||||
|
|
||||||
if (end_lnum > iptr->isn_lnum)
|
if (end_lnum > iptr->isn_lnum)
|
||||||
|
Reference in New Issue
Block a user