Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gnt: Avoid double unmapping on domain cleanup
Oxenstored itself, when cleaning up domains and connections, can call Gnt.unmap transitively several times. Under certain conditions, this can later result in a segfault bringing oxenstored down when it tries to use a freed grant. Set the mmap_interface pointer to NULL after the first attempt so that it can be detected on the subsequent ones. Since we are already at it, bring out accesses to OCaml fields out of the critical section. Signed-off-by: Andrii Sultanov <[email protected]>
- Loading branch information