Fix Conditional jump or move depends on uninitialised value(s) eg ./testsprite2 --trackmem
diff --git a/src/test/SDL_test_memory.c b/src/test/SDL_test_memory.c
index 7cf707d..4963dea 100644
--- a/src/test/SDL_test_memory.c
+++ b/src/test/SDL_test_memory.c
@@ -233,6 +233,12 @@ void SDLTest_LogAllocations()
return;
}
+ message = SDL_realloc_orig(NULL, 1);
+ if (!message) {
+ return;
+ }
+ *message = 0;
+
#define ADD_LINE() \
message_size += (SDL_strlen(line) + 1); \
tmp = (char *)SDL_realloc_orig(message, message_size); \