mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-01 20:05:19 +00:00
qemu: hotplug: Don't leak 'nodename' in qemuDomainChangeMediaBlockdev
qemuDomainDiskGetBackendAlias allocates a copy of the nodename string so we need to free it at the end. Found by Coverity. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
c86735e2d8
commit
8aced2ea32
@ -700,6 +700,7 @@ qemuDomainChangeMediaBlockdev(virQEMUDriverPtr driver,
|
||||
cleanup:
|
||||
qemuHotplugDiskSourceDataFree(newbackend);
|
||||
qemuHotplugDiskSourceDataFree(oldbackend);
|
||||
VIR_FREE(nodename);
|
||||
/* caller handles correct exchange of sources */
|
||||
disk->src = oldsrc;
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user