Fix compilation problems

introduced on commit 9231aa7d95
* src/qemu/qemu_driver.c: in qemudRemoveDomainStatus fix a reference
  to an undefined variable buf and free up an allocated string
This commit is contained in:
Daniel Veillard 2009-11-03 16:24:46 +01:00
parent 991be60403
commit 112ed8f50d

View File

@ -274,16 +274,19 @@ qemudRemoveDomainStatus(virConnectPtr conn,
if (virAsprintf(&file, "%s/%s.xml", driver->stateDir, vm->def->name) < 0) {
virReportOOMError(conn);
goto cleanup;
return(-1);
}
if (unlink(file) < 0 && errno != ENOENT && errno != ENOTDIR)
VIR_WARN(_("Failed to remove domain XML for %s: %s"),
vm->def->name, virStrerror(errno, buf, sizeof(ebuf)));
vm->def->name, virStrerror(errno, ebuf, sizeof(ebuf)));
VIR_FREE(file);
if (virFileDeletePid(driver->stateDir, vm->def->name) != 0)
VIR_WARN(_("Failed to remove PID file for %s: %s"),
vm->def->name, virStrerror(errno, ebuf, sizeof(ebuf)));
return 0;
}