Skip to content

Commit

Permalink
Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicletz committed Jan 20, 2025
1 parent e563676 commit 9bd6d9d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions c_src/nif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ class LockedStates {
if (it != states.end() && it->second == mt->shared_state) {
states.erase(it);
}

destroy_shared_state(mt, lock);
}


destroy_shared_state(mt, lock);
lock.unlock();
enif_mutex_unlock(mtx);
}
Expand Down

0 comments on commit 9bd6d9d

Please sign in to comment.