提交 288c4740 编写于 作者: E Erik Skultety 提交者: Peter Krempa

Fix libvirtd crash when removing metadata

When trying to remove nonexistent metadata from XML, libvirt daemon
crashes due to dereferencing NULL pointer.

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1143955
上级 15ee3c25
......@@ -974,6 +974,9 @@ virXMLFindChildNodeByNs(xmlNodePtr root,
{
xmlNodePtr next;
if (!root)
return NULL;
for (next = root->children; next; next = next->next) {
if (next->ns &&
STREQ_NULLABLE((const char *) next->ns->href, uri))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册