mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00: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;
|
xmlNodePtr next;
|
||||||
|
|
||||||
|
if (!root)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
for (next = root->children; next; next = next->next) {
|
for (next = root->children; next; next = next->next) {
|
||||||
if (next->ns &&
|
if (next->ns &&
|
||||||
STREQ_NULLABLE((const char *) next->ns->href, uri))
|
STREQ_NULLABLE((const char *) next->ns->href, uri))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user