Skip to content

Commit

Permalink
src: fix leak in AsyncProgressWorkerBase<DataType>
Browse files Browse the repository at this point in the history
Fix leak of ThreadSafeData in AsyncProgressWorkerBase<DataType>

PR-URL: nodejs/node-addon-api#795
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
  • Loading branch information
kevindavies8 committed Sep 22, 2020
1 parent 6568c18 commit 2a65eb9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions napi-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4730,6 +4730,7 @@ inline void AsyncProgressWorkerBase<DataType>::OnAsyncWorkProgress(Napi::Env /*
void* data) {
ThreadSafeData* tsd = static_cast<ThreadSafeData*>(data);
tsd->asyncprogressworker()->OnWorkProgress(tsd->data());
delete tsd;
}

template <typename DataType>
Expand Down

0 comments on commit 2a65eb9

Please sign in to comment.