]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Close logfile fd after spawning qemu
authorRyota Ozaki <ozaki.ryota@gmail.com>
Thu, 10 Sep 2009 09:34:14 +0000 (11:34 +0200)
committerDaniel Veillard <veillard@redhat.com>
Thu, 10 Sep 2009 09:34:14 +0000 (11:34 +0200)
* src/qemu_driver.c: avoid a leak of file descriptor when exec'ing qemu

src/qemu_driver.c

index 5c2a8ec255d4c11d89a055789c5ff6ad8daaab19..d778a89f14666918e550860ac2652bb0c97ecb07 100644 (file)
@@ -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: