Patch 9.0.1136

3 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 2, 2023, 4:04:47 PM1/2/23
to vim...@googlegroups.com

Patch 9.0.1136
Problem: Memory leak when getting class member type from expr.
Solution: Clear the expression result.
Files: src/vim9class.c


*** ../vim-9.0.1135/src/vim9class.c 2023-01-01 20:31:26.677588486 +0000
--- src/vim9class.c 2023-01-02 21:01:42.648545919 +0000
***************
*** 99,106 ****
--- 99,109 ----
int res = eval0(expr, &tv, eap, &evalarg);

if (res == OK)
+ {
type = typval2type(&tv, get_copyID(), type_list,
TVTT_DO_MEMBER);
+ clear_tv(&tv);
+ }
if (type == NULL)
{
semsg(_(e_cannot_get_object_member_type_from_initializer_str),
*** ../vim-9.0.1135/src/version.c 2023-01-02 20:37:58.225452652 +0000
--- src/version.c 2023-01-02 21:02:27.324528633 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1136,
/**/

--
God made machine language; all the rest is the work of man.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages