To: vim_dev@googlegroups.com Subject: Patch 9.0.1136 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///