Commit: patch 9.2.0066: memory leak in build_drop_cmd()

0 views
Skip to first unread message

Christian Brabandt

unread,
Feb 26, 2026, 4:16:50 PM (6 days ago) Feb 26
to vim...@googlegroups.com
patch 9.2.0066: memory leak in build_drop_cmd()

Commit: https://github.com/vim/vim/commit/c0740e046e936ccff4fb622b6a108e0e2306b04f
Author: Huihui Huang <625...@qq.com>
Date: Thu Feb 26 21:08:50 2026 +0000

patch 9.2.0066: memory leak in build_drop_cmd()

Problem: memory leak in build_drop_cmd()
Solution: Free cdp.string on early return
(Huihui Huang).

closes: #19517

Signed-off-by: Huihui Huang <625...@qq.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/clientserver.c b/src/clientserver.c
index 3d801bbf0..ae5130dd3 100644
--- a/src/clientserver.c
+++ b/src/clientserver.c
@@ -740,6 +740,7 @@ build_drop_cmd(
);
if (p == NULL)
{
+ vim_free(cdp.string);
vim_free(ga.ga_data);
return NULL;
}
diff --git a/src/version.c b/src/version.c
index 046a7e473..6402b27b4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 66,
/**/
65,
/**/
Reply all
Reply to author
Forward
0 new messages