Skip to content

Commit

Permalink
Fix: memory leaks in PAR2Proc due to missing gfmat_free function call (
Browse files Browse the repository at this point in the history
  • Loading branch information
dnzbk authored Oct 30, 2024
1 parent 454c6c7 commit f65eb8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions parpar/gf16/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ PAR2Proc::PAR2Proc() IF_LIBUV(: endSignalled(false)) {
gfmat_init();
}

PAR2Proc::~PAR2Proc() {
gfmat_free();
}

bool PAR2Proc::init(size_t sliceSize, const std::vector<struct PAR2ProcBackendAlloc>& _backends IF_LIBUV(, const PAR2ProcCompleteCb& _progressCb)) {
#ifdef USE_LIBUV
Expand Down
2 changes: 2 additions & 0 deletions parpar/gf16/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ struct PAR2ProcBackendAlloc {
};

class PAR2Proc {
public:
~PAR2Proc();
private:
bool hasAdded;
#ifdef USE_LIBUV
Expand Down

0 comments on commit f65eb8a

Please sign in to comment.