> On 1 Feb 2023, at 13:29, Andrew Cooper wrote:
>
> All caml_alloc_*() functions can throw exceptions, and longjump out of
> context. If this happens, we leak the xch/xce handle.
>
> Reorder the logic to allocate the the Ocaml object first.
>
> Fixes: 8b3c06a3e545 ("tools/ocaml/xenctrl:
All caml_alloc_*() functions can throw exceptions, and longjump out of
context. If this happens, we leak the xch/xce handle.
Reorder the logic to allocate the the Ocaml object first.
Fixes: 8b3c06a3e545 ("tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free")
Fixes: 22d5affdf0ce