patch 9.2.0133: memory leak in netbeans_file_activated()
Commit:
https://github.com/vim/vim/commit/248de84d869b40fe1e836c715f3f370a719621d3
Author: Huihui Huang <[email protected]>
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 <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
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,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1w030p-00GVqz-F8%40256bit.org.