[PATCH 3/9] conf: events: don't crash on NULL uuid

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

 



nodedev events don't have a uuid value and will pass in NULL
---
 src/conf/object_event.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conf/object_event.c b/src/conf/object_event.c
index cb984ff..bbef7f6 100644
--- a/src/conf/object_event.c
+++ b/src/conf/object_event.c
@@ -659,7 +659,8 @@ virObjectEventNew(virClassPtr klass,
         return NULL;
     }
     event->meta.id = id;
-    memcpy(event->meta.uuid, uuid, VIR_UUID_BUFLEN);
+    if (uuid)
+        memcpy(event->meta.uuid, uuid, VIR_UUID_BUFLEN);
 
     VIR_DEBUG("obj=%p", event);
     return event;
-- 
2.7.4

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