mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 01:41:10 +00:00
Fix a memory leak.
The command hash table is shared between all progs engine instances, but it was being allocated for every instance. Ensure only one is allocated.
This commit is contained in:
parent
6484dd16c7
commit
a8245e598e
1 changed files with 2 additions and 1 deletions
|
@ -164,7 +164,8 @@ RUA_Cmd_Init (progs_t *pr, int secure)
|
|||
res->cmds = 0;
|
||||
PR_Resources_Register (pr, "Cmd", res, bi_cmd_clear);
|
||||
|
||||
bi_cmds = Hash_NewTable (1021, bi_cmd_get_key, bi_cmd_free, 0);
|
||||
if (!bi_cmds)
|
||||
bi_cmds = Hash_NewTable (1021, bi_cmd_get_key, bi_cmd_free, 0);
|
||||
|
||||
PR_RegisterBuiltins (pr, builtins);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue