mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-02-04 05:34:53 +01:00
* WebAssembly threads: destroy the event and mutex in WasiBeginThread in case wasi_thread_spawn fails
This commit is contained in:
parent
77d592221a
commit
e03389c6a8
@ -399,6 +399,8 @@ begin
|
||||
else
|
||||
begin
|
||||
{$IFDEF DEBUGWASMTHREADS}DebugWriteln('WasiBeginThread: spawn thread failed');{$ENDIF}
|
||||
WasiRTLEventDestroy(T^.DoneEvent);
|
||||
DoneMutex(T^.Running);
|
||||
if Assigned(T^.StackBlock) then
|
||||
FreeMem(T^.StackBlock);
|
||||
if Assigned(T^.TLSBlock) then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user