Patch 7.4.2131
Problem: More memory leaks when using partial, e.g. for "exit-cb".
Solution: Don't copy the callback when using a partial.
Files: src/channel.c
*** ../vim-7.4.2130/src/channel.c 2016-07-22 21:49:36.674031468 +0200
--- src/channel.c 2016-07-30 23:01:24.338764892 +0200
***************
*** 1272,1281 ****
if (item != NULL)
{
- item->cq_callback = vim_strsave(callback);
item->cq_partial = partial;
if (partial != NULL)
++partial->pt_refcount;
item->cq_seq_nr = id;
item->cq_prev = head->cq_prev;
head->cq_prev = item;
--- 1272,1285 ----
if (item != NULL)
{
item->cq_partial = partial;
if (partial != NULL)
+ {
++partial->pt_refcount;
+ item->cq_callback = callback;
+ }
+ else
+ item->cq_callback = vim_strsave(callback);
item->cq_seq_nr = id;
item->cq_prev = head->cq_prev;
head->cq_prev = item;
***************
*** 4465,4474 ****
}
else
{
- job->jv_exit_cb = vim_strsave(opt->jo_exit_cb);
job->jv_exit_partial = opt->jo_exit_partial;
if (job->jv_exit_partial != NULL)
++job->jv_exit_partial->pt_refcount;
}
}
}
--- 4469,4482 ----
}
else
{
job->jv_exit_partial = opt->jo_exit_partial;
if (job->jv_exit_partial != NULL)
+ {
+ job->jv_exit_cb = opt->jo_exit_cb;
++job->jv_exit_partial->pt_refcount;
+ }
+ else
+ job->jv_exit_cb = vim_strsave(opt->jo_exit_cb);
}
}
}
*** ../vim-7.4.2130/src/version.c 2016-07-30 22:47:44.322520729 +0200
--- src/version.c 2016-07-30 23:02:13.930295414 +0200
***************
*** 765,766 ****
--- 765,768 ----
{ /* Add new patch number below this line */
+ /**/
+ 2131,
/**/
--
SIGIRO -- irony detected (iron core dumped)
/// 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.