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.
This commit is contained in:
Michal Privoznik 2011-10-09 10:42:42 +02:00
parent 0654d274e6
commit cd016a46c7

View File

@ -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);