Re: [PATCH] conf: Copy loadparm in virDomainDeviceInfoCopy()

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

 



Hi Andrea,

Thank you for fixing this :)

Thanks
Farhan

On 06/26/2017 01:13 PM, Andrea Bolognani wrote:
Commit 54fa1b44afc8 added virDomainDeviceInfo::loadparm
and updated virDomainDeviceInfoClear() accordingly, but
omitted the necessary virDomainDeviceInfoCopy() changes.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e5595d7..8fabb89 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3812,12 +3812,14 @@ virDomainDeviceInfoCopy(virDomainDeviceInfoPtr dst,
     /* first a shallow copy of *everything* */
     *dst = *src;

-    /* then redo the two fields that are pointers */
+    /* then copy whatever's left */
     dst->alias = NULL;
     dst->romfile = NULL;
+    dst->loadparm = NULL;

     if (VIR_STRDUP(dst->alias, src->alias) < 0 ||
-        VIR_STRDUP(dst->romfile, src->romfile) < 0)
+        VIR_STRDUP(dst->romfile, src->romfile) < 0 ||
+        VIR_STRDUP(dst->loadparm, src->loadparm) < 0)
         return -1;
     return 0;
 }


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