From 4dba04256b8a49b201d685217d3d7abc4988f090 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 3 Feb 2021 19:35:13 +0100 Subject: patch 8.2.2457: Coverity warns for memory leak Problem: Coverity warns for memory leak. Solution: Free memory when out of memory. --- src/if_cscope.c | 3 +++ src/version.c | 2 ++ 2 files changed, 5 insertions(+) (limited to 'src') 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, "")==0) strcpy(context, "<>"); diff --git a/src/version.c b/src/version.c index 804899f064..ab00e37c79 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 */ +/**/ + 2457, /**/ 2456, /**/ -- cgit v1.2.3