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: #795
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
  • Loading branch information
fholzer authored and mhdawson committed Sep 22, 2020
1 parent 79a777e commit ceb27d4
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 ceb27d4

Please sign in to comment.