mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-31 18:15:25 +00:00
qemu: Do not release device address on successful RNG attach
Commit id '980b265d' neglected to check for a successful status when deciding whether to release the device address for the RNG attach thus the address would be released even though the device was added. Signed-off-by: Luyao Huang <lhuang@redhat.com>
This commit is contained in:
parent
731d9cf251
commit
0ed3b33535
@ -1695,7 +1695,7 @@ qemuDomainAttachRNGDevice(virQEMUDriverPtr driver,
|
||||
audit:
|
||||
virDomainAuditRNG(vm, NULL, rng, "attach", ret == 0);
|
||||
cleanup:
|
||||
if (vm)
|
||||
if (ret < 0 && vm)
|
||||
qemuDomainReleaseDeviceAddress(vm, &rng->info, NULL);
|
||||
VIR_FREE(charAlias);
|
||||
VIR_FREE(objAlias);
|
||||
|
Loading…
Reference in New Issue
Block a user