xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <paul.durrant@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Wei Liu <wei.liu2@citrix.com>,
	Paul Durrant <paul.durrant@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH v2 1/5] tools/libxenctrl: fix error check after opening libxenforeignmemory
Date: Wed, 22 Feb 2017 13:27:34 +0000	[thread overview]
Message-ID: <1487770058-21040-2-git-send-email-paul.durrant@citrix.com> (raw)
In-Reply-To: <1487770058-21040-1-git-send-email-paul.durrant@citrix.com>

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>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 tools/libxc/xc_private.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
index f0e089c..9df6925 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;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-02-22 13:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 13:27 [PATCH v2 0/5] tools/libxendevicemodel Paul Durrant
2017-02-22 13:27 ` Paul Durrant [this message]
2017-02-22 14:09   ` [PATCH v2 1/5] tools/libxenctrl: fix error check after opening libxenforeignmemory Wei Liu
2017-04-05 13:25     ` Ian Jackson
2017-02-22 14:09   ` Ian Jackson
2017-02-22 13:27 ` [PATCH v2 2/5] tools/libxendevicemodel: introduce the new library Paul Durrant
2017-02-22 14:11   ` Ian Jackson
2017-02-22 13:27 ` [PATCH v2 3/5] tools/libxendevicemodel: extract functions and add a compat layer Paul Durrant
2017-02-22 14:20   ` Ian Jackson
2017-02-22 14:33     ` Andrew Cooper
2017-02-22 14:37       ` Ian Jackson
2017-02-22 14:41         ` Andrew Cooper
2017-02-22 15:04           ` Ian Jackson
2017-02-22 15:27             ` Andrew Cooper
2017-02-22 13:27 ` [PATCH v2 4/5] tools/libxendevicemodel: introduce a Linux-specific implementation Paul Durrant
2017-02-22 14:22   ` Ian Jackson
2017-02-22 13:27 ` [PATCH v2 5/5] tools/libxendevicemodel: add a call to restrict the handle Paul Durrant
2017-02-22 14:22   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487770058-21040-2-git-send-email-paul.durrant@citrix.com \
    --to=paul.durrant@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).