Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff -r 7af530381fec src/eval.c
--- a/src/eval.c Sun Aug 17 17:24:07 2014 +0200
+++ b/src/eval.c Mon Aug 18 16:39:16 2014 +0900
@@ -6899,8 +6899,8 @@
free_unref_items(copyID)
int copyID;
{
- dict_T *dd;
- list_T *ll;
+ dict_T *dd, *dd_next;
+ list_T *ll, *ll_next;
int did_free = FALSE;
/*
@@ -6912,11 +6912,10 @@
/* Free the Dictionary and ordinary items it contains, but don't
* recurse into Lists and Dictionaries, they will be in the list
* of dicts or list of lists. */
+ dd_next = dd->dv_used_next;
dict_free(dd, FALSE);
did_free = TRUE;
-
- /* restart, next dict may also have been freed */
- dd = first_dict;
+ dd = dd_next;
}
else
dd = dd->dv_used_next;
@@ -6933,11 +6932,10 @@
/* Free the List and ordinary items it contains, but don't recurse
* into Lists and Dictionaries, they will be in the list of dicts
* or list of lists. */
+ ll_next = ll->lv_used_next;
list_free(ll, FALSE);
did_free = TRUE;
-
- /* restart, next list may also have been freed */
- ll = first_list;
+ ll = ll_next;
}
else
ll = ll->lv_used_next;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.