Patch 8.2.0788

12 views
Skip to first unread message

Bram Moolenaar

unread,
May 17, 2020, 5:35:21 PM5/17/20
to vim...@googlegroups.com

Patch 8.2.0788
Problem: Memory leak in libvterm.
Solution: free tmpbuffer.
Files: src/libvterm/src/vterm.c


*** ../vim-8.2.0787/src/libvterm/src/vterm.c 2020-05-17 22:27:36.728262245 +0200
--- src/libvterm/src/vterm.c 2020-05-17 23:32:53.612520839 +0200
***************
*** 79,84 ****
--- 79,91 ----

vt->tmpbuffer_len = 64;
vt->tmpbuffer = vterm_allocator_malloc(vt, vt->tmpbuffer_len);
+ if (vt->tmpbuffer == NULL)
+ {
+ vterm_allocator_free(vt, vt->parser.strbuffer);
+ vterm_allocator_free(vt, vt);
+ vterm_allocator_free(vt, vt->outbuffer);
+ return NULL;
+ }

return vt;
}
***************
*** 93,98 ****
--- 100,106 ----

vterm_allocator_free(vt, vt->parser.strbuffer);
vterm_allocator_free(vt, vt->outbuffer);
+ vterm_allocator_free(vt, vt->tmpbuffer);

vterm_allocator_free(vt, vt);
}
*** ../vim-8.2.0787/src/version.c 2020-05-17 23:00:48.782969093 +0200
--- src/version.c 2020-05-17 23:34:05.712281494 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 788,
/**/

--
hundred-and-one symptoms of being an internet addict:
125. You begin to wonder how often it REALLY is necessary to get up
and shower or bathe.

/// 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