mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 15:15:25 +00:00
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:
parent
991be60403
commit
112ed8f50d
@ -274,16 +274,19 @@ qemudRemoveDomainStatus(virConnectPtr conn,
|
|||||||
|
|
||||||
if (virAsprintf(&file, "%s/%s.xml", driver->stateDir, vm->def->name) < 0) {
|
if (virAsprintf(&file, "%s/%s.xml", driver->stateDir, vm->def->name) < 0) {
|
||||||
virReportOOMError(conn);
|
virReportOOMError(conn);
|
||||||
goto cleanup;
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlink(file) < 0 && errno != ENOENT && errno != ENOTDIR)
|
if (unlink(file) < 0 && errno != ENOENT && errno != ENOTDIR)
|
||||||
VIR_WARN(_("Failed to remove domain XML for %s: %s"),
|
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)
|
if (virFileDeletePid(driver->stateDir, vm->def->name) != 0)
|
||||||
VIR_WARN(_("Failed to remove PID file for %s: %s"),
|
VIR_WARN(_("Failed to remove PID file for %s: %s"),
|
||||||
vm->def->name, virStrerror(errno, ebuf, sizeof(ebuf)));
|
vm->def->name, virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user