[gamecode] Make modules responsible for freeing resources

It should have been this way all along, and it seems I thought they were
when I did rua_gui.c as it already freed its resource block, which would
have been a double free (oops). Fixes an invalid write when shutting
down progs in qwaq-cmd (relevant change not committed).
This commit is contained in:
Bill Currie 2023-03-03 19:36:28 +09:00
parent 9146860f70
commit 70aa970c32
25 changed files with 31 additions and 2 deletions

View file

@ -79,7 +79,6 @@ PR_Resources_Shutdown (progs_t *pr)
while (res) {
pr_resource_t *t = res->next;
res->destroy (pr, res->data);
free (res->data);
free (res);
res = t;
}