[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxenlight: don't try to delete path when they doesn't exists.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1262951282 0 # Node ID b35974051d7e6b41b0f829452306d9eb45340dd2 # Parent 9a49e6a66bf0572d003ff68c621a8e7c04008171 libxenlight: don't try to delete path when they doesn't exists. fix segfault in destroy when creation hasn't been done properly. Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx> --- tools/libxl/libxl.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff -r 9a49e6a66bf0 -r b35974051d7e tools/libxl/libxl.c --- a/tools/libxl/libxl.c Fri Jan 08 11:47:28 2010 +0000 +++ b/tools/libxl/libxl.c Fri Jan 08 11:48:02 2010 +0000 @@ -564,16 +564,19 @@ int libxl_domain_destroy(struct libxl_ct XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", dom_path); vm_path = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, "/local/domain/%d/vm", domid)); - if (!xs_rm(ctx->xsh, XBT_NULL, vm_path)) - XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", vm_path); + if (vm_path) + if (!xs_rm(ctx->xsh, XBT_NULL, vm_path)) + XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", vm_path); vss_path = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, "/local/domain/%d/vss", domid)); - if (!xs_rm(ctx->xsh, XBT_NULL, vss_path)) - XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", vss_path); + if (vss_path) + if (!xs_rm(ctx->xsh, XBT_NULL, vss_path)) + XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", vss_path); xapi_path = libxl_sprintf(ctx, "/xapi/%u", domid); - if (!xs_rm(ctx->xsh, XBT_NULL, xapi_path)) - XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", xapi_path); + if (xapi_path) + if (!xs_rm(ctx->xsh, XBT_NULL, xapi_path)) + XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", xapi_path); rc = xc_domain_destroy(ctx->xch, domid); if (rc < 0) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |