fix segfault in libvchan client error path
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.
Signed-off-by Anil Madhavapeddy <[email protected]>
tools/libvchan/init.c +1 -1
@@ -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))
Anil Madhavapeddy writes ("[Xen-devel] [PATCH] fix segfault in libvchan client error path"):
Quoted 5 lines
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 <[email protected]>
Committed-by Ian Jackson <[email protected]>