patch 9.2.0133: memory leak in netbeans_file_activated()
Commit:
https://github.com/vim/vim/commit/248de84d869b40fe1e836c715f3f370a719621d3
Author: Huihui Huang <
625...@qq.com>
Date: Tue Mar 10 19:33:22 2026 +0000
patch 9.2.0133: memory leak in netbeans_file_activated()
Problem: memory leak in netbeans_file_activated()
Solution: Free q on early return (Huihui Huang).
closes: #19626
Signed-off-by: Huihui Huang <
625...@qq.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/netbeans.c b/src/netbeans.c
index 516ac16da..976a2574a 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -2603,8 +2603,13 @@ netbeans_file_activated(buf_T *bufp)
return;
q = nb_quote(bufp->b_ffname);
- if (q == NULL || bp == NULL)
+ if (q == NULL)
+ return;
+ if (bp == NULL)
+ {
+ vim_free(q);
return;
+ }
vim_snprintf(buffer, sizeof(buffer), "%d:fileOpened=%d \"%s\" %s %s
",
bufno,
diff --git a/src/version.c b/src/version.c
index e65ab8298..7d7c7e4dc 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 */
+/**/
+ 133,
/**/
132,
/**/