Patch 8.0.1079
Problem: Memory leak when remote_foreground() fails.
Solution: Free the error message.
Files: src/evalfunc.c, src/if_xcmdsrv.c
*** ../vim-8.0.1078/src/evalfunc.c 2017-09-08 14:39:25.642102863 +0200
--- src/evalfunc.c 2017-09-09 15:01:09.769950325 +0200
***************
*** 8638,8644 ****
--- 8638,8647 ----
# endif
{
if (r != NULL)
+ {
EMSG(r); /* sending worked but evaluation failed */
+ vim_free(r);
+ }
else
EMSG2(_("E241: Unable to send to %s"), server_name);
return;
***************
*** 8698,8703 ****
--- 8701,8708 ----
argvars[1].v_type = VAR_STRING;
argvars[1].vval.v_string = vim_strsave((char_u *)"foreground()");
argvars[2].v_type = VAR_UNKNOWN;
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
remote_common(argvars, rettv, TRUE);
vim_free(argvars[1].vval.v_string);
# endif
*** ../vim-8.0.1078/src/if_xcmdsrv.c 2017-03-19 21:20:45.885034380 +0100
--- src/if_xcmdsrv.c 2017-09-09 15:10:17.490195547 +0200
***************
*** 420,425 ****
--- 420,426 ----
{
LookupName(dpy, loosename ? loosename : name,
/*DELETE=*/TRUE, NULL);
+ vim_free(loosename);
continue;
}
}
*** ../vim-8.0.1078/src/version.c 2017-09-09 15:28:08.146515551 +0200
--- src/version.c 2017-09-09 16:25:24.906743248 +0200
***************
*** 771,772 ****
--- 771,774 ----
{ /* Add new patch number below this line */
+ /**/
+ 1079,
/**/
--
There's no place like $(HOME)!
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
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].
For more options, visit https://groups.google.com/d/optout.