mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 01:11:18 +00:00
/D'OH/!!! How many /years/ have I been working with linked lists and free?
This commit is contained in:
parent
dc5846948e
commit
340e104778
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue