[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] python/xc: do not crash xend if /proc/xen/privcmd cannot be opened
# HG changeset patch # User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> # Date 1277218808 -3600 # Node ID 2ad890d46cb8a11fc6ea329126d398021307e627 # Parent fa809ed6f534101158645c3f99be37a121eedb02 python/xc: do not crash xend if /proc/xen/privcmd cannot be opened If /proc/xen/privcmd cannot be opened, start xend occurs Segmentation fault. Add check to fix it. Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx> --- tools/python/xen/lowlevel/xc/xc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -r fa809ed6f534 -r 2ad890d46cb8 tools/python/xen/lowlevel/xc/xc.c --- a/tools/python/xen/lowlevel/xc/xc.c Tue Jun 22 15:39:42 2010 +0100 +++ b/tools/python/xen/lowlevel/xc/xc.c Tue Jun 22 16:00:08 2010 +0100 @@ -72,7 +72,8 @@ static PyObject *pyxc_error_to_exception else pyerr = Py_BuildValue("(is)", err->code, desc); - xc_clear_last_error(xch); + if (xch) + xc_clear_last_error(xch); if ( pyerr != NULL ) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |