From: Paul Durrant Date: Wed, 22 Feb 2017 13:27:34 +0000 (+0000) Subject: tools/libxenctrl: fix error check after opening libxenforeignmemory X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2717 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=80a7d04f532ddc3500acd7988917708a536ae15f;p=xen.git tools/libxenctrl: fix error check after opening libxenforeignmemory Checking the value of xch->xcall is clearly incorrect. The code should be checking xch->fmem (i.e. the return of the previously called function). Signed-off-by: Paul Durrant Acked-by: Wei Liu Acked-by: Ian Jackson --- diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c index f0e089c704..9df69253f5 100644 --- a/tools/libxc/xc_private.c +++ b/tools/libxc/xc_private.c @@ -64,8 +64,7 @@ struct xc_interface_core *xc_interface_open(xentoollog_logger *logger, goto err; xch->fmem = xenforeignmemory_open(xch->error_handler, 0); - - if ( xch->xcall == NULL ) + if ( xch->fmem == NULL ) goto err; return xch;