]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0066: memory leak in build_drop_cmd() v9.2.0066
authorHuihui Huang <625173@qq.com>
Thu, 26 Feb 2026 21:08:50 +0000 (21:08 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 26 Feb 2026 21:08:50 +0000 (21:08 +0000)
Problem:  memory leak in build_drop_cmd()
Solution: Free cdp.string on early return
          (Huihui Huang).

closes: #19517

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/clientserver.c
src/version.c

index 3d801bbf0f661f6ff62ef443177d0500f20537ee..ae5130dd3ebc35bbac0ac3f18a204f78b99e3648 100644 (file)
@@ -740,6 +740,7 @@ build_drop_cmd(
                );
        if (p == NULL)
        {
+           vim_free(cdp.string);
            vim_free(ga.ga_data);
            return NULL;
        }
index 046a7e473b9d0bf71b7e9eebd7ebf0e25a97f075..6402b27b46cd452e6991128d95dbf52ef4efb1a1 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    66,
 /**/
     65,
 /**/