Patch 8.2.2661
Problem: Leaking memory when looping over a string.
Solution: Free the memory.
Files: src/eval.c
*** ../vim-8.2.2660/src/eval.c 2021-03-26 20:41:24.773620612 +0100
--- src/eval.c 2021-03-26 22:10:48.509015043 +0100
***************
*** 1815,1822 ****
tv.v_lock = VAR_FIXED;
tv.vval.v_string = vim_strnsave(fi->fi_string + fi->fi_byte_idx, len);
fi->fi_byte_idx += len;
! return ex_let_vars(arg, &tv, TRUE, fi->fi_semicolon,
fi->fi_varcount, flag, NULL) == OK;
}
item = fi->fi_lw.lw_item;
--- 1815,1824 ----
tv.v_lock = VAR_FIXED;
tv.vval.v_string = vim_strnsave(fi->fi_string + fi->fi_byte_idx, len);
fi->fi_byte_idx += len;
! result = ex_let_vars(arg, &tv, TRUE, fi->fi_semicolon,
fi->fi_varcount, flag, NULL) == OK;
+ vim_free(tv.vval.v_string);
+ return result;
}
item = fi->fi_lw.lw_item;
*** ../vim-8.2.2660/src/version.c 2021-03-26 21:27:48.580922728 +0100
--- src/version.c 2021-03-26 22:15:10.120230429 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2661,
/**/
--
I am also told that there is a logical proof out there somewhere
that demonstrates that there is no task which duct tape cannot handle.
-- Paul Brannan
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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 on the web visit
https://groups.google.com/d/msgid/vim_dev/202103262118.12QLIL18428557%40masaka.moolenaar.net.