diff mbox series

[v4,07/11] fixup! tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free

Message ID c0fab282ed4decc3375ef2abb8fe1e3591fb5508.1671214525.git.edwin.torok@cloud.com (mailing list archive)
State New, archived
Headers show
Series OCaml fixes | expand

Commit Message

Edwin Török Dec. 16, 2022, 6:25 p.m. UTC
Fix unused value warning.

Fixes: 8b3c06a3e5 ("tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free")
Signed-off-by: Edwin Török <edwin.torok@cloud.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>

---
Changes:
* new patch
---
 tools/ocaml/libs/xc/xenctrl.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml
index b02be07429..a59dee0938 100644
--- a/tools/ocaml/libs/xc/xenctrl.ml
+++ b/tools/ocaml/libs/xc/xenctrl.ml
@@ -182,7 +182,7 @@  let get_handle () = !handle
 
 let close_handle () =
   match !handle with
-  | Some h -> handle := None
+  | Some _ -> handle := None
   | None -> ()
 
 let with_intf f =