Added guards in create object initialization to prevent memory leaks (#664)

This commit is contained in:
Steve Karg
2024-06-02 07:09:26 -05:00
committed by GitHub
parent ec066fcc70
commit 17c5e2e98d
12 changed files with 33 additions and 18 deletions
+2 -3
View File
@@ -809,8 +809,7 @@ void Time_Value_Cleanup(void)
*/
void Time_Value_Init(void)
{
Object_List = Keylist_Create();
if (Object_List) {
atexit(Time_Value_Cleanup);
if (!Object_List) {
Object_List = Keylist_Create();
}
}