Skip to content
Permalink
Browse files
Deallocate future mutex in the future resource destructor
Otherwise we end up leaking mutexes #49
  • Loading branch information
nickva committed Jan 25, 2022
1 parent 74a31ce commit a2e6505b92cff2966a855f5c9240c7111e9c1340
Showing 1 changed file with 4 additions and 0 deletions.
@@ -74,6 +74,10 @@ erlfdb_future_dtor(ErlNifEnv* env, void* obj)
if(f->msg_env != NULL) {
enif_free_env(f->msg_env);
}

if(f->lock != NULL) {
enif_mutex_destroy(f->lock);
}
}


0 comments on commit a2e6505

Please sign in to comment.