Skip to content

Commit ade7032

Browse files
dinosaurehannesm
authored andcommitted
Fix leaked file-descriptor on the Miou fuzzer
1 parent f1f1d9b commit ade7032

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

miou/tests/fuzz.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ let run_server ~to_server:actions ~stop fd cfg =
195195
ignore
196196
( Miou.async ~orphans @@ fun () ->
197197
match Tls_miou_unix.server_of_fd cfg fd with
198-
| tls -> run ~role:"server" actions tls
198+
| tls ->
199+
let str = run ~role:"server" actions tls in
200+
inhibit (fun () -> Miou_unix.close fd); str
199201
| exception _ ->
200202
Miou_unix.close fd;
201203
String.empty );

0 commit comments

Comments
 (0)