]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1749: leaking memory in cs_find_common() v9.1.1749
authorChristian Brabandt <cb@256bit.org>
Wed, 10 Sep 2025 07:59:38 +0000 (03:59 -0400)
committerChristian Brabandt <cb@256bit.org>
Wed, 10 Sep 2025 07:59:38 +0000 (03:59 -0400)
Problem:  leaking memory in cs_find_common()
          (after v9.1.1746)
Solution: Also free nummatches before returning

closes: #18258

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/if_cscope.c
src/version.c

index e571dd754d61985a8977d4392fcbc4209dd22b35..8188885d451346b1a5f0973a237c4d7efd724dd8 100644 (file)
@@ -1233,7 +1233,10 @@ cs_find_common(
        win_T       *wp = NULL;
 
        if (tmp == NULL)
+       {
+           vim_free(nummatches);
            return FALSE;
+       }
 
        f = mch_fopen((char *)tmp, "w");
        if (f == NULL)
index 85ccf3fa84b5d299a06fe2d5e12c67ec9c2625db..10958a5091e0decc0b0e5546468d854df77c731e 100644 (file)
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1749,
 /**/
     1748,
 /**/