[PATCH 2/2] conf: Fix leak in virNodeDeviceObjListExport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix a leak introduced by 4337bc57b when VIR_STRDUP'g the parent.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/node_device_conf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index 1c81b48..c802840 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;
                 }
-- 
2.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux