[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxc: Free logger after printing error message
commit 86216963fd1d89883bb8120535704fdc79fdad50 Author: Jason Andryuk <andryuk@xxxxxxxx> AuthorDate: Fri May 16 16:41:17 2014 -0400 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Mon May 19 12:28:38 2014 +0100 libxc: Free logger after printing error message On error, PERROR calls the already destroyed logger, which can segfault. Re-order the calls, so the logger is still available. Signed-off-by: Jason Andryuk <andryuk@xxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxc/xc_private.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c index 0e18892..10e7e20 100644 --- a/tools/libxc/xc_private.c +++ b/tools/libxc/xc_private.c @@ -201,14 +201,14 @@ static int xc_interface_close_common(xc_interface *xch) if (!xch) return 0; + rc = xch->ops->close(xch, xch->ops_handle); + if (rc) PERROR("Could not close hypervisor interface"); + xc__hypercall_buffer_cache_release(xch); xtl_logger_destroy(xch->dombuild_logger_tofree); xtl_logger_destroy(xch->error_handler_tofree); - rc = xch->ops->close(xch, xch->ops_handle); - if (rc) PERROR("Could not close hypervisor interface"); - free(xch); return rc; } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |