mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-04 21:47:16 +03:00
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
This commit is contained in:
parent
15ee3c2511
commit
288c47406c
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user