visualtest: use SDL_malloc

This commit is contained in:
Sylvain authored and Sam Lantinga committed 2021-11-22 08:38:46 -08:00
1 parent 30338beb61
commit 5699e0fa0c
8 files changed
+19 -19

No files matched your search

+6 -6
View File
@@ -54,7 +54,7 @@ SDLVisualTest_EnqueueAction(SDLVisualTest_ActionQueue* queue,
sizeof(SDLVisualTest_ActionNode));
if(!node)
{
SDLTest_LogError("malloc() failed");
SDLTest_LogError("SDL_malloc() failed");
return 0;
}
node->action = action;
@@ -220,10 +220,10 @@ SDLVisualTest_InsertIntoActionQueue(SDLVisualTest_ActionQueue* queue,
return 1;
}
newnode = (SDLVisualTest_ActionNode*)malloc(sizeof(SDLVisualTest_ActionNode));
newnode = (SDLVisualTest_ActionNode*)SDL_malloc(sizeof(SDLVisualTest_ActionNode));
if(!newnode)
{
SDLTest_LogError("malloc() failed");
SDLTest_LogError("SDL_malloc() failed");
return 0;
}
newnode->action = action;
@@ -344,7 +344,7 @@ SDLVisualTest_ParseActionConfig(char* file, SDLVisualTest_ActionQueue* queue)
path = (char*)SDL_malloc(sizeof(char) * (len + 1));
if(!path)
{
SDLTest_LogError("malloc() failed");
SDLTest_LogError("SDL_malloc() failed");
SDLVisualTest_EmptyActionQueue(queue);
SDL_RWclose(rw);
return 0;
@@ -358,7 +358,7 @@ SDLVisualTest_ParseActionConfig(char* file, SDLVisualTest_ActionQueue* queue)
args = (char*)SDL_malloc(sizeof(char) * (len + 1));
if(!args)
{
SDLTest_LogError("malloc() failed");
SDLTest_LogError("SDL_malloc() failed");
SDL_free(path);
SDLVisualTest_EmptyActionQueue(queue);
SDL_RWclose(rw);
@@ -393,4 +393,4 @@ SDLVisualTest_ParseActionConfig(char* file, SDLVisualTest_ActionQueue* queue)
SDL_RWclose(rw);
return 1;
}
}