Skip to content

Commit 4dba042

Browse files
committed
patch 8.2.2457: Coverity warns for memory leak
Problem: Coverity warns for memory leak. Solution: Free memory when out of memory.
1 parent 7b6903f commit 4dba042

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/if_cscope.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,10 @@ cs_file_results(FILE *f, int *nummatches_a)
18131813

18141814
context = alloc(strlen(cntx)+5);
18151815
if (context == NULL)
1816+
{
1817+
vim_free(fullname);
18161818
continue;
1819+
}
18171820

18181821
if (strcmp(cntx, "<global>")==0)
18191822
strcpy(context, "<<global>>");

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2457,
753755
/**/
754756
2456,
755757
/**/

0 commit comments

Comments
 (0)