From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9F266A2EEB for ; Tue, 10 Sep 2019 09:41:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 258201EBEC; Tue, 10 Sep 2019 09:41:35 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 909271EBE5; Tue, 10 Sep 2019 09:41:33 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 00:41:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,487,1559545200"; d="scan'208";a="186771119" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 10 Sep 2019 00:41:32 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 10 Sep 2019 00:41:32 -0700 Received: from bgsmsx104.gar.corp.intel.com (10.223.4.190) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 10 Sep 2019 00:41:31 -0700 Received: from bgsmsx105.gar.corp.intel.com ([169.254.3.241]) by BGSMSX104.gar.corp.intel.com ([169.254.5.248]) with mapi id 14.03.0439.000; Tue, 10 Sep 2019 13:11:29 +0530 From: "Babu Radhakrishnan, AgalyaX" To: "dev@dpdk.org" CC: "Pattan, Reshma" , "hemant.agrawal@nxp.com" , "sachin.saxena@nxp.com" , "Parthasarathy, JananeeX M" , "stable@dpdk.org" Thread-Topic: [PATCH] bus/fslmc: fix for resource leak coverity issue Thread-Index: AQHVZ6oGJ3tiiMwQ+0mqS8vi8jMtwackhZ3w Date: Tue, 10 Sep 2019 07:41:29 +0000 Message-ID: <27BEB63E27FEB2409936481F1E06A394D6E2FF@BGSMSX105.gar.corp.intel.com> References: <1568100655-20010-1-git-send-email-agalyax.babu.radhakrishnan@intel.com> In-Reply-To: <1568100655-20010-1-git-send-email-agalyax.babu.radhakrishnan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] bus/fslmc: fix for resource leak coverity issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, > -----Original Message----- > From: Babu Radhakrishnan, AgalyaX > Sent: Tuesday, September 10, 2019 1:01 PM > To: dev@dpdk.org > Cc: Pattan, Reshma ; > hemant.agrawal@nxp.com; sachin.saxena@nxp.com; Parthasarathy, > JananeeX M ; Babu Radhakrishnan, > AgalyaX ; stable@dpdk.org > Subject: [PATCH] bus/fslmc: fix for resource leak coverity issue >=20 > From: Agalya Babu RadhaKrishnan >=20 > 1 issue caught by 344967 > Leaked_storage: Variable sep going out of scope leaks the storage it poin= ts > to. >=20 > When 'sep' is not null and sep_exist is 0, 'sep' is freed before going ou= t of > scope of the function irrespective of 'addr' exists or not. >=20 > Coverity Issue: 344967 > Fixes: e67a61614d0b ("bus/fslmc: support device iteration") > Cc: stable@dpdk.org >=20 > Signed-off-by: Agalya Babu RadhaKrishnan > > --- if (strncmp("dpni", sep, 4) && strncmp("dpseci", sep, 6) && strncmp("dpcon", sep, 5) & ..... We think validation of device name is done using AND operator instead it sh= ould be done by OR operator. Please confirm.