From: Bram Moolenaar Date: Wed, 3 Feb 2021 18:35:13 +0000 (+0100) Subject: patch 8.2.2457: Coverity warns for memory leak X-Git-Tag: v8.2.2457 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4dba04256b8a49b201d685217d3d7abc4988f090;p=vim patch 8.2.2457: Coverity warns for memory leak Problem: Coverity warns for memory leak. Solution: Free memory when out of memory. --- diff --git a/src/if_cscope.c b/src/if_cscope.c index bbb429ab9..f52316fae 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 804899f06..ab00e37c7 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, /**/