[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2] libxl: check for xc_domain_shutdown failure in libxl__domain_suspend_common_callback
Coverity-ID: 1055048 Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx> --- v2: Don't log ret in error case, log errno instead tools/libxl/libxl_dom.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index c164469..1812bdc 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -1041,7 +1041,11 @@ int libxl__domain_suspend_common_callback(void *user) if (dss->hvm && (!hvm_pvdrv || hvm_s_state)) { LOG(DEBUG, "Calling xc_domain_shutdown on HVM domain"); - xc_domain_shutdown(CTX->xch, domid, SHUTDOWN_suspend); + ret = xc_domain_shutdown(CTX->xch, domid, SHUTDOWN_suspend); + if (ret < 0) { + LOGE(ERROR, "xc_domain_shutdown failed"); + return 0; + } /* The guest does not (need to) respond to this sort of request. */ dss->guest_responded = 1; } else { -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |