Re: [PATCH] nodedev: Return the parent for a virNodeDevicePtr struct

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

 



On Thu, Feb 09, 2017 at 02:23:47PM -0500, John Ferlan wrote:


On 02/09/2017 07:39 AM, Bjoern Walk wrote:

[...]

                    }
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 6820298..8dd738b 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5450,7 +5450,10 @@ testNodeDeviceLookupByName(virConnectPtr conn,
const char *name)
        goto cleanup;
    }

-    ret = virGetNodeDevice(conn, name);
+    if ((ret = virGetNodeDevice(conn, name))) {
+        if (VIR_STRDUP(ret->parent, obj->def->parent) < 0)
+            virObjectUnref(ret);
+    }

 cleanup:
    if (obj)
@@ -5648,6 +5651,7 @@ testNodeDeviceCreateXML(virConnectPtr conn,
                                           0);

    dev = virGetNodeDevice(conn, def->name);
+    ignore_value(VIR_STRDUP(def->parent, def->parent));

One of those should be dev probably.


Oh right goog catch... It should be VIR_STRDUP(dev->parent, def->parent)

I've fixed in my local branch

ACK with that fix.

Jan

Attachment: signature.asc
Description: Digital signature

--
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