From cd016a46c78605bc7030450861f66c9739263e27 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Sun, 9 Oct 2011 10:42:42 +0200 Subject: [PATCH] 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. --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);