From: Wei Liu Date: Mon, 6 Jun 2016 10:52:12 +0000 (+0100) Subject: libxl: log file name in failure in libxl__create_qemu_logfile X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~955 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=10055f661eee96383cd302c6177bd7068e9a00bd;p=xen.git libxl: log file name in failure in libxl__create_qemu_logfile Signed-off-by: Wei Liu Acked-by: Ian Jackson --- diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 6ff05c315f..de16a5912f 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -52,13 +52,15 @@ static int libxl__create_qemu_logfile(libxl__gc *gc, char *name) if (rc) return rc; logfile_w = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0644); - free(logfile); if (logfile_w < 0) { - LOGE(ERROR, "unable to open Qemu logfile"); + LOGE(ERROR, "unable to open Qemu logfile: %s", logfile); + free(logfile); return ERROR_FAIL; } + free(logfile); + return logfile_w; }