mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
conf: Fix leak in virNodeDeviceObjListExport
Fix a leak introduced by 4337bc57b
when VIR_STRDUP'g the parent.
This commit is contained in:
parent
0a6cb28b9a
commit
5ad03b9db2
@ -2288,6 +2288,7 @@ virNodeDeviceObjListExport(virConnectPtr conn,
|
|||||||
if (devices) {
|
if (devices) {
|
||||||
if (!(device = virGetNodeDevice(conn, devobj->def->name)) ||
|
if (!(device = virGetNodeDevice(conn, devobj->def->name)) ||
|
||||||
VIR_STRDUP(device->parent, devobj->def->parent) < 0) {
|
VIR_STRDUP(device->parent, devobj->def->parent) < 0) {
|
||||||
|
virObjectUnref(device);
|
||||||
virNodeDeviceObjUnlock(devobj);
|
virNodeDeviceObjUnlock(devobj);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user