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 -- [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/20230102210439.AB2651C0AA3%40moolenaar.net.

Raspunde prin e-mail lui