0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.3931: Coverity reports a memory leak

Problem:    Coverity reports a memory leak.
Solution:   Free memory in case of failure.
This commit is contained in:
Bram Moolenaar
2021-12-29 11:59:53 +00:00
parent c97f9a55bd
commit febb78fa17
2 changed files with 5 additions and 0 deletions

View File

@@ -3310,7 +3310,10 @@ xdiff_out(
return -1; return -1;
if (ga_grow(&dout->dout_ga, 1) == FAIL) if (ga_grow(&dout->dout_ga, 1) == FAIL)
{
vim_free(p);
return -1; return -1;
}
p->lnum_orig = start_a + 1; p->lnum_orig = start_a + 1;
p->count_orig = count_a; p->count_orig = count_a;

View File

@@ -749,6 +749,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 */
/**/
3931,
/**/ /**/
3930, 3930,
/**/ /**/