From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753584AbbIRK5T (ORCPT ); Fri, 18 Sep 2015 06:57:19 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:35898 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753554AbbIRK5R (ORCPT ); Fri, 18 Sep 2015 06:57:17 -0400 From: Sudip Mukherjee To: David Woodhouse , Joerg Roedel Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Sudip Mukherjee Subject: [PATCH] iommu/vt-d: fix memory leak Date: Fri, 18 Sep 2015 16:27:07 +0530 Message-Id: <1442573827-28795-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We are returning NULL if we are not able to attach the iommu to the domain but while returning we missed freeing info. Signed-off-by: Sudip Mukherjee --- drivers/iommu/intel-iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 8a74fcc..668acf7 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -2305,6 +2305,7 @@ static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu *iommu, if (ret) { spin_unlock_irqrestore(&device_domain_lock, flags); + free_devinfo_mem(info); return NULL; } -- 1.9.1