Skip to content

Commit

Permalink
wutstdc++: Fix potential memory leak when thread creation fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maschell authored and fincs committed Sep 17, 2022
1 parent 6c1388a commit be79908
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/wutstdc++/wut_gthread_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ __wut_thread_create(OSThread **outThread,

char *stack = (char *)memalign(16, __WUT_STACK_SIZE);
if (!stack) {
free(thread);
return ENOMEM;
}

Expand Down

0 comments on commit be79908

Please sign in to comment.