tools/ocaml: libxc: Check error return in stub_xc_vcpu_context_get()
authorJulien Grall <jgrall@amazon.com>
Sun, 29 Mar 2020 19:12:34 +0000 (20:12 +0100)
committerJulien Grall <jgrall@amazon.com>
Mon, 20 Apr 2020 14:02:17 +0000 (15:02 +0100)
commit3bf69699cacad3efb4fe6109044365f79379ed20
tree245fbacef268901770871cbe8ec7713cf3d71506
parentca58e7b0800aaef85739508674abca2db9c6637d
tools/ocaml: libxc: Check error return in stub_xc_vcpu_context_get()

xc_vcpu_getcontext() may fail to retrieve the vcpu context. Rather than
ignoring the return value, check it and throw an error if needed.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
tools/ocaml/libs/xc/xenctrl_stubs.c