Signed-off-by: Wei Liu <wei.l...@citrix.com> --- tools/libxl/xl_cmdimpl.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index bfd8e59..fc61650 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -2763,6 +2763,11 @@ static uint32_t create_domain(struct domain_create *dom_info) printf_info_sexp(-1, &d_config, cfg_print_fh); } else { char *json = libxl_domain_config_to_json(ctx, &d_config); + if (!json) { + fprintf(stderr, + "Failed to convert domain configuration to JSON\n"); + exit(1); + } fputs(json, cfg_print_fh); free(json); flush_stream(cfg_print_fh); -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel