mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 01:18:00 +03:00
qemu: Fix memory leak in qemuDomainBlockJobSetSpeed()
fix 'device' leak in qemuDomainBlockJobSetSpeed Signed-off-by: Jie Wang <wangjie88.huawei.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d63f1c6ad9
commit
a03f5cddfc
@ -17347,7 +17347,7 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom,
|
||||
virDomainDiskDefPtr disk;
|
||||
int ret = -1;
|
||||
virDomainObjPtr vm;
|
||||
const char *device;
|
||||
char *device = NULL;
|
||||
unsigned long long speed = bandwidth;
|
||||
|
||||
virCheckFlags(VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES, -1);
|
||||
@ -17395,6 +17395,7 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom,
|
||||
qemuDomainObjEndJob(driver, vm);
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(device);
|
||||
virDomainObjEndAPI(&vm);
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user