mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +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 (!(device = virGetNodeDevice(conn, devobj->def->name)) ||
|
||||
VIR_STRDUP(device->parent, devobj->def->parent) < 0) {
|
||||
virObjectUnref(device);
|
||||
virNodeDeviceObjUnlock(devobj);
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user