mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.2457: Coverity warns for memory leak
Problem: Coverity warns for memory leak. Solution: Free memory when out of memory.
This commit is contained in:
parent
7b6903f02c
commit
4dba04256b
@ -1813,7 +1813,10 @@ cs_file_results(FILE *f, int *nummatches_a)
|
||||
|
||||
context = alloc(strlen(cntx)+5);
|
||||
if (context == NULL)
|
||||
{
|
||||
vim_free(fullname);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp(cntx, "<global>")==0)
|
||||
strcpy(context, "<<global>>");
|
||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2457,
|
||||
/**/
|
||||
2456,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user