diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-03 19:35:13 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-03 19:35:13 +0100 |
commit | 4dba04256b8a49b201d685217d3d7abc4988f090 (patch) | |
tree | c7ffb911251a8066fc91075e251459153935deb4 /src | |
parent | 7b6903f02c9eeb12cd85941ea0d352d84e4dab30 (diff) |
patch 8.2.2457: Coverity warns for memory leakv8.2.2457
Problem: Coverity warns for memory leak.
Solution: Free memory when out of memory.
Diffstat (limited to 'src')
-rw-r--r-- | src/if_cscope.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/if_cscope.c b/src/if_cscope.c index bbb429ab91..f52316faec 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -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>>"); diff --git a/src/version.c b/src/version.c index 804899f064..ab00e37c79 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2457, +/**/ 2456, /**/ 2455, |