aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libvchan
diff options
context:
space:
mode:
authorAnil Madhavapeddy <anil@recoil.org>2011-11-24 19:09:55 +0000
committerAnil Madhavapeddy <anil@recoil.org>2011-11-24 19:09:55 +0000
commit6a14fdf92048ef07ba8e10bde3b175e79152f94f (patch)
tree3e3ba185de91551b7684216924dc72885efc068c /tools/libvchan
parentb3d436d2a4a6efc5529e8c251b3b351a830db6bf (diff)
downloadxen-6a14fdf92048ef07ba8e10bde3b175e79152f94f.tar.gz
xen-6a14fdf92048ef07ba8e10bde3b175e79152f94f.tar.bz2
xen-6a14fdf92048ef07ba8e10bde3b175e79152f94f.zip
libvchan: fix segfault in client error path
In libvchan_client_init, go to the error path if the gntdev device is not available. Otherwise, a segfault happens later as the vchan context is invalid. Signed-off-by: Anil Madhavapeddy <anil@recoil.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libvchan')
-rw-r--r--tools/libvchan/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libvchan/init.c b/tools/libvchan/init.c
index becf71d2ab..acaddd5b04 100644
--- a/tools/libvchan/init.c
+++ b/tools/libvchan/init.c
@@ -385,7 +385,7 @@ struct libxenvchan *libxenvchan_client_init(xentoollog_logger *logger, int domai
ctrl->gnttab = xc_gnttab_open(logger, 0);
if (!ctrl->gnttab)
- goto out;
+ goto fail;
// set up event channel
if (init_evt_cli(ctrl, domain, logger))