提交 2bfa7513 编写于 作者: J Jovanka Gulicoska 提交者: Cole Robinson

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.
上级 128a8b2c
...@@ -659,7 +659,8 @@ virObjectEventNew(virClassPtr klass, ...@@ -659,7 +659,8 @@ virObjectEventNew(virClassPtr klass,
return NULL; return NULL;
} }
event->meta.id = id; 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); VIR_DEBUG("obj=%p", event);
return event; return event;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册