[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: domain_vgic_init: Avoid double free on shared_irqs
commit 7b41618f5a08145b0198af4a8a2ce361d7e677e6 Author: Julien Grall <julien.grall@xxxxxxxxxx> AuthorDate: Fri Jul 25 15:17:26 2014 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Sep 9 11:43:38 2014 +0100 xen/arm: domain_vgic_init: Avoid double free on shared_irqs When the function domain_vgic_init is failing to initialize pending_irqs, it will free shared_irqs. Few call later, domain_vgic_free will be called an try to free a second time the same variable. This will result to a double free. Remove the free in domain_vgic_init and rely on domain_vgic_free to correctly release the memory. Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/arch/arm/vgic.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index 6b41dbf..1372ffc 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -85,10 +85,7 @@ int domain_vgic_init(struct domain *d) d->arch.vgic.pending_irqs = xzalloc_array(struct pending_irq, d->arch.vgic.nr_lines); if ( d->arch.vgic.pending_irqs == NULL ) - { - xfree(d->arch.vgic.shared_irqs); return -ENOMEM; - } for (i=0; i<d->arch.vgic.nr_lines; i++) { -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |