patch 7.4.1261
Problem: Pending channel messages are garbage collected. Leaking memory in
ch_sendexpr(). Leaking memory for a decoded JSON string.
Solution: Mark the message list as used. Free the encoded JSON. Don't save
the JSON string.
diff --git a/src/eval.c b/src/eval.c
index 892e14a..f13486f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -6855,6 +6855,10 @@
abort = abort || set_ref_in_python3(copyID);
#endif
+#ifdef FEAT_CHANNEL
+ abort = abort || set_ref_in_channel(copyID);
+#endif
+
if (!abort)
{
/*
@@ -9842,6 +9846,7 @@
return;
ch_idx = send_common(argvars, text, "sendexpr");
+ vim_free(text);
if (ch_idx >= 0)
{
if (channel_read_json_block(ch_idx, id, &listtv) == OK)