patch 7.4.1719
Problem: Leaking memory when there is a cycle involving a job and a
partial.
Solution: Add a copyID to job and channel. Set references in items referred
by them. Go through all jobs and channels to find unreferenced
items. Also, decrement reference counts when garbage collecting.
diff --git a/src/ops.c b/src/ops.c
index b1910d9..0584877 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -6391,7 +6391,7 @@
{
if (list_append_string(list, NULL, -1) == FAIL)
{
- list_free(list, TRUE);
+ list_free(list);
return NULL;
}
list->lv_first->li_tv.vval.v_string = s;
@@ -6465,7 +6465,7 @@
error = TRUE;
if (error)
{
- list_free(list, TRUE);
+ list_free(list);
return NULL;
}
return (char_u *)list;