fix memory leak found by maiconpintoabreu

This commit is contained in:
CrackedPixel 2026-02-26 16:13:33 -06:00
parent 72b206624f
commit 2884a67fc6

View File

@ -3546,11 +3546,11 @@ AutomationEventList LoadAutomationEventList(const char *fileName)
{
AutomationEventList list = { 0 };
#if SUPPORT_AUTOMATION_EVENTS
// Allocate and empty automation event list, ready to record new events
list.events = (AutomationEvent *)RL_CALLOC(MAX_AUTOMATION_EVENTS, sizeof(AutomationEvent));
list.capacity = MAX_AUTOMATION_EVENTS;
#if SUPPORT_AUTOMATION_EVENTS
if (fileName == NULL) TRACELOG(LOG_INFO, "AUTOMATION: New empty events list loaded successfully");
else
{