From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH for-4.5 3/3] python/xs: Correct the indirection of the NULL xshandle() check Date: Fri, 28 Nov 2014 11:32:00 +0000 Message-ID: <1417174320.23604.10.camel@citrix.com> References: <1417091674-8163-1-git-send-email-andrew.cooper3@citrix.com> <1417091674-8163-4-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-4-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: Andrew Cooper Cc: Wei Liu , Ian Jackson , Xen Coverity Team , Xen-devel List-Id: xen-devel@lists.xenproject.org On Thu, 2014-11-27 at 12:34 +0000, Andrew Cooper wrote: > 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 Acked-by: Ian Campbell > --- > 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))