]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
python/xs: Correct the indirection of the NULL xshandle() check
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 27 Nov 2014 12:34:34 +0000 (12:34 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 4 Dec 2014 12:06:54 +0000 (12:06 +0000)
The code now now matches its comment, and will actually catch the case of a
bad xs handle.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Coverity-ID: 1055948
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Xen Coverity Team <coverity@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/python/xen/lowlevel/xs/xs.c

index 84e1711f6027919e1ededa2b281d50c5ceb163e8..ec364bb5350bf559231985c549cb7f99d8d6ee74 100644 (file)
@@ -816,7 +816,7 @@ static int parse_transaction_path(XsHandle *self, PyObject *args,
 
     *xh = xshandle(self);
 
-    if (!xh)
+    if (!*xh)
         return 0;
 
     if (!PyArg_ParseTuple(args, "ss", &thstr, path))