/D'OH/!!! How many /years/ have I been working with linked lists and free?

This commit is contained in:
Bill Currie 2001-06-11 22:42:05 +00:00
parent dc5846948e
commit 340e104778
1 changed files with 3 additions and 1 deletions

View File

@ -105,6 +105,7 @@ void
PR_GarbageCollect (progs_t *pr)
{
strref_t *sr;
strref_t *next;
ddef_t *def;
int i, j;
@ -129,7 +130,8 @@ PR_GarbageCollect (progs_t *pr)
}
}
}
for (sr = pr->dynamic_strings.next; sr; sr = sr->next) {
for (sr = pr->dynamic_strings.next; sr; sr = next) {
next = sr->next;
if (!sr->count) {
Hash_Del (pr->strref_hash, sr->string);
strref_free (sr, pr);