comparison src/diff.c @ 26805:77ff030699d2 v8.2.3931

patch 8.2.3931: Coverity reports a memory leak Commit: https://github.com/vim/vim/commit/febb78fa1798e0f95983b3f7881419a754886df5 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Dec 29 11:59:53 2021 +0000 patch 8.2.3931: Coverity reports a memory leak Problem: Coverity reports a memory leak. Solution: Free memory in case of failure.
author Bram Moolenaar <Bram@vim.org>
date Wed, 29 Dec 2021 13:00:05 +0100
parents 83a99f08d1e8
children 88a33cf5aeb6
comparison
equal deleted inserted replaced
26804:34f1b7d6974a 26805:77ff030699d2
3308 3308
3309 if (p == NULL) 3309 if (p == NULL)
3310 return -1; 3310 return -1;
3311 3311
3312 if (ga_grow(&dout->dout_ga, 1) == FAIL) 3312 if (ga_grow(&dout->dout_ga, 1) == FAIL)
3313 {
3314 vim_free(p);
3313 return -1; 3315 return -1;
3316 }
3314 3317
3315 p->lnum_orig = start_a + 1; 3318 p->lnum_orig = start_a + 1;
3316 p->count_orig = count_a; 3319 p->count_orig = count_a;
3317 p->lnum_new = start_b + 1; 3320 p->lnum_new = start_b + 1;
3318 p->count_new = count_b; 3321 p->count_new = count_b;