From 2bfa751344ea04d02aa2a4439381e1a59361c561 Mon Sep 17 00:00:00 2001 From: Jovanka Gulicoska Date: Tue, 19 Jul 2016 19:23:06 +0200 Subject: [PATCH] conf: events: handle NULL uuid Not all objects have a uuid, such as nodedevs. When we add events support for them, NULL will be passed here, so handle it. --- 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 cb984ff487..bbef7f6bf2 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; -- GitLab