mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-10 01:09:10 -04:00
fix memory leak found by maiconpintoabreu (#5598)
This commit is contained in:
@ -3546,11 +3546,11 @@ AutomationEventList LoadAutomationEventList(const char *fileName)
|
|||||||
{
|
{
|
||||||
AutomationEventList list = { 0 };
|
AutomationEventList list = { 0 };
|
||||||
|
|
||||||
|
#if SUPPORT_AUTOMATION_EVENTS
|
||||||
// Allocate and empty automation event list, ready to record new events
|
// Allocate and empty automation event list, ready to record new events
|
||||||
list.events = (AutomationEvent *)RL_CALLOC(MAX_AUTOMATION_EVENTS, sizeof(AutomationEvent));
|
list.events = (AutomationEvent *)RL_CALLOC(MAX_AUTOMATION_EVENTS, sizeof(AutomationEvent));
|
||||||
list.capacity = MAX_AUTOMATION_EVENTS;
|
list.capacity = MAX_AUTOMATION_EVENTS;
|
||||||
|
|
||||||
#if SUPPORT_AUTOMATION_EVENTS
|
|
||||||
if (fileName == NULL) TRACELOG(LOG_INFO, "AUTOMATION: New empty events list loaded successfully");
|
if (fileName == NULL) TRACELOG(LOG_INFO, "AUTOMATION: New empty events list loaded successfully");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user