Skip to content

Commit

Permalink
Fixed memory leak in testthread
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 28, 2024
1 parent 728bf36 commit dfe6efc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/testthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <SDL3/SDL_test.h>

static SDL_TLSID tls;
static SDL_Thread *thread = NULL;
static int alive = 0;
static int testprio = 0;
static SDLTest_CommonState *state;
Expand Down Expand Up @@ -83,13 +84,13 @@ killed(int sig)
SDL_Log("Killed with SIGTERM, waiting 5 seconds to exit\n");
SDL_Delay(5 * 1000);
alive = 0;
SDL_WaitThread(thread, NULL);
quit(0);
}

int main(int argc, char *argv[])
{
int i;
SDL_Thread *thread;

/* Initialize test framework */
state = SDLTest_CommonCreateState(argv, 0);
Expand Down

0 comments on commit dfe6efc

Please sign in to comment.