mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-10-22 08:08:14 +00:00
Fix pthread_attr leak
This commit is contained in:
1 parent
3a377e7d7b
commit
435bc6a5a4
1 file changed
+1
@@ -293,6 +293,7 @@ int PltCreateThread(const char* name, ThreadEntry entry, void* context, PLT_THRE
|
||||
ctx->name = name;
|
||||
|
||||
int err = pthread_create(&thread->thread, &attr, ThreadProc, ctx);
|
||||
pthread_attr_destroy(&attr);
|
||||
if (err != 0) {
|
||||
free(ctx);
|
||||
return err;
|
||||
|
||||
Reference in new issue
Block a user