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

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



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


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