From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tian, Kevin" Subject: Re: [PATCH] dmar: Fix double free in error paths following c/s a8bc99b Date: Mon, 20 Jul 2015 01:31:47 +0000 Message-ID: References: <1437047823-24686-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1437047823-24686-1-git-send-email-andrew.cooper3@citrix.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Xen-devel Cc: Elena Ufimtseva , "Zhang, Yang Z" , Jan Beulich List-Id: xen-devel@lists.xenproject.org > From: Andrew Cooper [mailto:andrew.cooper3@citrix.com] > Sent: Thursday, July 16, 2015 7:57 PM > > Several error paths would end up freeing scope->devices twice. > > Signed-off-by: Andrew Cooper > CC: Jan Beulich > CC: Elena Ufimtseva > CC: Yang Zhang > CC: Kevin Tian Acked-by: Kevin Tian > --- > xen/drivers/passthrough/vtd/dmar.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c > index 8ed1e24..2672688 100644 > --- a/xen/drivers/passthrough/vtd/dmar.c > +++ b/xen/drivers/passthrough/vtd/dmar.c > @@ -88,6 +88,7 @@ static void scope_devices_free(struct dmar_scope *scope) > > scope->devices_cnt = 0; > xfree(scope->devices); > + scope->devices = NULL; > } > > static void __init disable_all_dmar_units(void) > -- > 1.7.10.4