From: Michal Privoznik Date: Sun, 9 Oct 2011 08:42:42 +0000 (+0200) Subject: qemuDomainAttach: Initialize pidfile variable X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cd016a46c78605bc7030450861f66c9739263e27;p=libvirt.git qemuDomainAttach: Initialize pidfile variable If parsing qemu command line fails (e.g. because of non-existing process number supplied), we jump to cleanup label where we free pidfile. Therefore it needs to be initialized. Otherwise we free random pointer. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2e6f3e4212..5588d93faf 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10179,7 +10179,7 @@ static virDomainPtr qemuDomainAttach(virConnectPtr conn, virDomainPtr dom = NULL; virDomainChrSourceDefPtr monConfig = NULL; bool monJSON = false; - char *pidfile; + char *pidfile = NULL; virCheckFlags(0, NULL);