Skip to contentSkip to conversation

fix segfault in libvchan client error path

PATCH In review Anil Madhavapeddy 2 participants 2 messages Nov 23, 2011 – Nov 24, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix segfault in libvchan client error path

# HG changeset patch
# User Anil Madhavapeddy <[email protected]>
# Date 1322064942 0
# Node ID 2934afb3348776eaad57d0d91893f00c862ac507
# Parent 0a0c02a616768bfab16c072788cb76be1893c37f
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.

tools/libvchan/init.c +1 -1
diff -r 0a0c02a61676 -r 2934afb33487 tools/libvchan/init.c
@@ -385,7 +385,7 @@
 
 	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))