diff --git a/libs/util/sys.c b/libs/util/sys.c index 16f6398e2..bc473aca8 100644 --- a/libs/util/sys.c +++ b/libs/util/sys.c @@ -387,12 +387,12 @@ Sys_Init_Cvars (void) void Sys_Shutdown (void) { - shutdown_list_t *p = shutdown_list, *t; + shutdown_list_t *t; - while (p) { - p->func (); - t = p; - p = p->next; + while (shutdown_list) { + shutdown_list->func (); + t = shutdown_list; + shutdown_list = shutdown_list->next; free (t); } }