Hi,
Running the test_matchstrpos.vim test under valgrind reports a
small memory leak in the find_some_match() function. The attached
patch fixes this leak.
- Yegappan
--
--
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].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/eval.c b/src/eval.c
index 3578c99..8bc4a39 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -15735,6 +15735,8 @@ find_some_match(typval_T *argvars, typval_T *rettv, int
type)
listitem_T *li3 = li2->li_next;
listitem_T *li4 = li3->li_next;
+ if (li1->li_tv.vval.v_string != NULL)
+ vim_free(li1->li_tv.vval.v_string);
li1->li_tv.vval.v_string = vim_strnsave(regmatch.startp[0],
(int)(regmatch.endp[0] - regmatch.startp[0]));
li3->li_tv.vval.v_number =