From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 5E1FC3237 for ; Mon, 11 Apr 2016 12:25:53 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 11 Apr 2016 03:25:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,462,1455004800"; d="scan'208";a="82918340" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga004.fm.intel.com with ESMTP; 11 Apr 2016 03:25:51 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 11 Apr 2016 11:25:51 +0100 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.57]) by irsmsx111.ger.corp.intel.com ([169.254.2.16]) with mapi id 14.03.0248.002; Mon, 11 Apr 2016 11:25:51 +0100 From: "Burakov, Anatoly" To: "Mrzyglod, DanielX T" , "dev@dpdk.org" Thread-Topic: [PATCH] eal: fix resource leak Thread-Index: AQHRk9cmKiy1NxQ24Eacy161GZ4DjJ+EkUow Date: Mon, 11 Apr 2016 10:25:49 +0000 Message-ID: References: <1460368014-9012-1-git-send-email-danielx.t.mrzyglod@intel.com> In-Reply-To: <1460368014-9012-1-git-send-email-danielx.t.mrzyglod@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjM1MzM3NWUtNTQ0Yy00NzliLWI4NmItMmJhNDI0YzkyMTA2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjgzbTczZXZ5ZXRqeDNrUjB1ZXR3NGJNSUFDZmFQQzl3XC9TOFMzRlRPXC96MD0ifQ== x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] eal: fix resource leak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 10:25:53 -0000 > Subject: [PATCH] eal: fix resource leak >=20 > CID 13289 (#1-2 of 2): Resource leak (RESOURCE_LEAK): > The system resource will not be reclaimed and reused, reducing the future > availability of the resource. > In pci_vfio_get_group_fd: Leak of memory or pointers to system resources >=20 > Fixes: ff0b67d1c868 ("vfio: DMA mapping") >=20 > Signed-off-by: Daniel Mrzyglod > --- > lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > index fdfdeb4..10266f8 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > @@ -535,6 +535,7 @@ pci_vfio_get_group_fd(int iommu_group_no) > /* if the fd is valid, create a new group for it */ > if (vfio_cfg.vfio_group_idx =3D=3D VFIO_MAX_GROUPS) { > RTE_LOG(ERR, EAL, "Maximum number of VFIO > groups reached!\n"); > + close(vfio_group_fd); > return -1; > } > vfio_cfg.vfio_groups[vfio_cfg.vfio_group_idx].group_no =3D > iommu_group_no; > -- > 2.5.5 Acked-by: Anatoly Burakov