All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Simon Cao <caobosimon@gmail.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	coverity@xenproject.org, Chunyan Liu <cyliu@suse.com>
Subject: [PATCH 1/2] libxl: Set rc on failure of usbdev_busaddr_to_busid
Date: Mon, 4 Apr 2016 16:09:59 +0100	[thread overview]
Message-ID: <1459782600-16073-1-git-send-email-ian.jackson@eu.citrix.com> (raw)

We must set rc before using `goto out'.

Bug introduced in bf7628f0 "libxl: add pvusb API".

CID: 1358113
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: coverity@xenproject.org
CC: Simon Cao <caobosimon@gmail.com>
CC: George Dunlap <george.dunlap@citrix.com>
CC: Chunyan Liu <cyliu@suse.com>
---
 tools/libxl/libxl_pvusb.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/libxl/libxl_pvusb.c b/tools/libxl/libxl_pvusb.c
index 5f92628..6f53317 100644
--- a/tools/libxl/libxl_pvusb.c
+++ b/tools/libxl/libxl_pvusb.c
@@ -905,6 +905,7 @@ static int libxl__device_usbdev_add_xenstore(libxl__gc *gc, uint32_t domid,
                                     usbdev->u.hostdev.hostaddr);
     if (!busid) {
         LOG(DEBUG, "Fail to get busid of usb device");
+        rc = ERROR_FAIL;
         goto out;
     }
 
-- 
1.7.10.4


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

             reply	other threads:[~2016-04-04 15:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 15:09 Ian Jackson [this message]
2016-04-04 15:10 ` [PATCH 2/2] libxl: Do not leak data on error path from libxl__read_sysfs_file_contents Ian Jackson
2016-04-07  8:16   ` Chun Yan Liu
2016-04-07 17:03     ` Ian Jackson
2016-04-07  8:17 ` [PATCH 1/2] libxl: Set rc on failure of usbdev_busaddr_to_busid Chun Yan Liu
2016-04-07 17:04   ` Ian Jackson
2016-04-08  3:48     ` Chun Yan Liu
2016-04-08 13:34       ` 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=1459782600-16073-1-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=caobosimon@gmail.com \
    --cc=coverity@xenproject.org \
    --cc=cyliu@suse.com \
    --cc=george.dunlap@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.