From: Andrew Cooper Subject: [PATCH for-4.5 3/3] python/xs: Correct the indirection of the NULL xshandle() check Date: Thu, 27 Nov 2014 12:34:34 +0000 Message-ID: <1417091674-8163-4-git-send-email-andrew.cooper3@citrix.com> References: <1417091674-8163-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1417091674-8163-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Ian Jackson , Ian Campbell , Xen Coverity Team , Wei Liu List-Id: xen-devel@lists.xenproject.org The code now now matches its comment, and will actually catch the case of a bad xs handle. Signed-off-by: Andrew Cooper Coverity-ID: 1055948 CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Xen Coverity Team --- tools/python/xen/lowlevel/xs/xs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/lowlevel/xs/xs.c b/tools/python/xen/lowlevel/xs/xs.c index 84e1711..ec364bb 100644 --- a/tools/python/xen/lowlevel/xs/xs.c +++ b/tools/python/xen/lowlevel/xs/xs.c @@ -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)) -- 1.7.10.4