diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-29 11:59:53 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-29 11:59:53 +0000 |
commit | febb78fa1798e0f95983b3f7881419a754886df5 (patch) | |
tree | dc127471312decf514a729a7d1cfb028f39e690d /src | |
parent | c97f9a55bd020b94d92c392516d763ed5e43d872 (diff) |
patch 8.2.3931: Coverity reports a memory leakv8.2.3931
Problem: Coverity reports a memory leak.
Solution: Free memory in case of failure.
Diffstat (limited to 'src')
-rw-r--r-- | src/diff.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/diff.c b/src/diff.c index 9fb8726b4d..d42233889c 100644 --- a/src/diff.c +++ b/src/diff.c @@ -3310,7 +3310,10 @@ xdiff_out( return -1; if (ga_grow(&dout->dout_ga, 1) == FAIL) + { + vim_free(p); return -1; + } p->lnum_orig = start_a + 1; p->count_orig = count_a; diff --git a/src/version.c b/src/version.c index b752bc4c79..09bce7b944 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3931, +/**/ 3930, /**/ 3929, |