aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/Initialization.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-10-24 20:25:40 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-10-24 20:39:41 -0300
commit8dd98ab247db83c6e7a49676f562f2cf18237700 (patch)
tree808ae1f48311f273d900022ea9d06e9b29c82dfd /lib/kernel/Initialization.ml
parent6a41a413be4eaade89f5eeab29b9e933551de8a0 (diff)
downloadRNT-8dd98ab247db83c6e7a49676f562f2cf18237700.tar.gz
RNT-8dd98ab247db83c6e7a49676f562f2cf18237700.zip
fix handle leak by always release a handle now from copies
Diffstat (limited to 'lib/kernel/Initialization.ml')
-rw-r--r--lib/kernel/Initialization.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/kernel/Initialization.ml b/lib/kernel/Initialization.ml
index 54bb76d..86c6882 100644
--- a/lib/kernel/Initialization.ml
+++ b/lib/kernel/Initialization.ml
@@ -20,12 +20,11 @@ let namespace entries =
evaluators, and whatever else it registers beside them. *)
let mount root name =
match Path.lookup root Path.(name @/ this) with
- | Ok mounted -> Ok mounted
+ | Ok mounted -> Ok (Protocols.Handle.release mounted)
| Error _ ->
let open Utilities.Result in
let* mounted = namespace ["evaluator", Namespace.make ()] in
- let* () = bind root (name, mounted) in
- Ok mounted
+ bind root (name, mounted)
module Make (S : Abstract.Storage.STORAGE) = struct
module BM = BranchManager.Make (S)