From: Ryota Ozaki Date: Thu, 10 Sep 2009 09:34:14 +0000 (+0200) Subject: Close logfile fd after spawning qemu X-Git-Tag: v0.7.1~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32456779a1e93854631cc8da930c077d04b56660;p=thirdparty%2Flibvirt.git Close logfile fd after spawning qemu * src/qemu_driver.c: avoid a leak of file descriptor when exec'ing qemu --- diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 5c2a8ec255..d778a89f14 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -2239,6 +2239,9 @@ static int qemudStartVMDaemon(virConnectPtr conn, /* No need for 'goto cleanup' now since qemudShutdownVMDaemon does enough */ } + if (logfile != -1) + close(logfile); + return ret; cleanup: