diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index a578e3b6e2..9027acba81 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -524,10 +524,12 @@ static int do_daemonize(char *name, const char *pidfile) exit(1); } - if ( close(fd) < 0 ) { + if (close(fd) < 0) { perror("Closing pidfile"); exit(1); } + + free(pid); } out: