From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH] dmar: Fix double free in error paths following c/s a8bc99b Date: Thu, 16 Jul 2015 12:57:03 +0100 Message-ID: <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: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Elena Ufimtseva , Andrew Cooper , Kevin Tian , Yang Zhang , Jan Beulich List-Id: xen-devel@lists.xenproject.org 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 --- 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