Patch 8.1.2095

13 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 28, 2019, 11:26:18 AM9/28/19
to vim...@googlegroups.com

Patch 8.1.2095
Problem: Leaking memory when getting item from dict.
Solution: Also free the key when not evaluating.
Files: src/dict.c


*** ../vim-8.1.2094/src/dict.c 2019-08-30 22:07:55.950547106 +0200
--- src/dict.c 2019-09-27 21:19:00.882694429 +0200
***************
*** 822,828 ****
goto failret;
}
item = dictitem_alloc(key);
- clear_tv(&tvkey);
if (item != NULL)
{
item->di_tv = tv;
--- 822,827 ----
***************
*** 831,836 ****
--- 830,836 ----
dictitem_free(item);
}
}
+ clear_tv(&tvkey);

if (**arg == '}')
break;
*** ../vim-8.1.2094/src/version.c 2019-09-28 16:29:44.175649771 +0200
--- src/version.c 2019-09-28 17:24:50.906556908 +0200
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 2095,
/**/

--
There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU,
Linux, etc, and those who know COBOL. It gets very difficult for me at
parties, not knowing which group to socialise with :-)
Sitaram Chamarty

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