Skip to contentSkip to conversation

xen/arm: Free p2m entry if fail to add it to RB tree

PATCH New Hillf Danton 1 participant 1 message Apr 30, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 xen/arm: Free p2m entry if fail to add it to RB tree

Release the newly allocated p2m entry if we detect a duplicate in the RB tree.

Cc Stefano Stabellini <[email protected]>

---

arch/arm/xen/p2m.c +0 -0
@@ -156,6 +156,7 @@ bool __set_phys_to_machine_multi(unsigne
	rc = xen_add_phys_to_mach_entry(p2m_entry);
	if (rc < 0) {
		write_unlock_irqrestore(&p2m_lock, irqflags);
+		kfree(p2m_entry);
		return false;
	}
	write_unlock_irqrestore(&p2m_lock, irqflags);

--

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel