Skip to content

Commit

Permalink
patch 8.2.2457: Coverity warns for memory leak
Browse files Browse the repository at this point in the history
Problem:    Coverity warns for memory leak.
Solution:   Free memory when out of memory.
  • Loading branch information
brammool committed Feb 3, 2021
1 parent 7b6903f commit 4dba042
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/if_cscope.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>>");
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2457,
/**/
2456,
/**/
Expand Down

0 comments on commit 4dba042

Please sign in to comment.