]> xenbits.xensource.com Git - xen.git/commitdiff
tools/libxenctrl: fix error check after opening libxenforeignmemory
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 22 Feb 2017 13:27:34 +0000 (13:27 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 5 Apr 2017 13:24:40 +0000 (14:24 +0100)
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 <paul.durrant@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
(cherry picked from commit 80a7d04f532ddc3500acd7988917708a536ae15f)

tools/libxc/xc_private.c

index d57c39a8c68b95854d9d031f7f891644364cca8c..9ba4b73229b14d9c06e459a831037824a937cc8b 100644 (file)
@@ -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;