mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
vz: fix memory leaks in attach/detach functions
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
91ee31d19e
commit
3cea593f35
@ -1167,6 +1167,7 @@ static int vzDomainAttachDeviceFlags(virDomainPtr domain, const char *xml,
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
virDomainDeviceDefFree(dev);
|
||||
virObjectUnlock(dom);
|
||||
return ret;
|
||||
}
|
||||
@ -1208,6 +1209,7 @@ static int vzDomainDetachDeviceFlags(virDomainPtr domain, const char *xml,
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
virDomainDeviceDefFree(dev);
|
||||
virObjectUnlock(dom);
|
||||
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user