Skip to content

Commit ceb27d4

Browse files
fholzermhdawson
authored andcommitted
src: fix leak in AsyncProgressWorkerBase<DataType>
Fix leak of ThreadSafeData in AsyncProgressWorkerBase<DataType> PR-URL: #795 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
1 parent 79a777e commit ceb27d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

napi-inl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4730,6 +4730,7 @@ inline void AsyncProgressWorkerBase<DataType>::OnAsyncWorkProgress(Napi::Env /*
47304730
void* data) {
47314731
ThreadSafeData* tsd = static_cast<ThreadSafeData*>(data);
47324732
tsd->asyncprogressworker()->OnWorkProgress(tsd->data());
4733+
delete tsd;
47334734
}
47344735

47354736
template <typename DataType>

0 commit comments

Comments
 (0)