diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 1c81b48053f3304bb97fc06368d9427ea72dbf43..c80284017ddca182701ed00b6471d8827d54ee48 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -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; }