From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 5CD3C475D for ; Thu, 28 Apr 2016 12:48:27 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 28 Apr 2016 03:48:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,546,1455004800"; d="scan'208";a="942007738" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga001.jf.intel.com with ESMTP; 28 Apr 2016 03:48:25 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.238]) by irsmsx105.ger.corp.intel.com ([169.254.7.35]) with mapi id 14.03.0248.002; Thu, 28 Apr 2016 11:48:21 +0100 From: "Dumitrescu, Cristian" To: "Kobylinski, MichalX" , "dev@dpdk.org" Thread-Topic: [PATCH] cfgfile: fix uninitialized scalar variable Thread-Index: AQHRlYISPHcHu7WQL0SuHUq7H/xGep+fS80A Date: Thu, 28 Apr 2016 10:48:21 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D89126479A6E0F@IRSMSX108.ger.corp.intel.com> References: <1460549702-16733-1-git-send-email-michalx.kobylinski@intel.com> In-Reply-To: <1460549702-16733-1-git-send-email-michalx.kobylinski@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzU1YTZlN2YtNzA0Zi00ZmU0LWIxOGMtOWQwNTA1MzAzYTFlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkdoZk45b0ZHTlwvdWR0ZFN5S1wvUTd2S1kxbDNsR2hJVHFXbGFEUlNuaUxiZz0ifQ== x-ctpclassification: CTP_IC 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] cfgfile: fix uninitialized scalar variable 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: Thu, 28 Apr 2016 10:48:27 -0000 > -----Original Message----- > From: Kobylinski, MichalX > Sent: Wednesday, April 13, 2016 1:15 PM > To: dev@dpdk.org; Dumitrescu, Cristian > Cc: Kobylinski, MichalX > Subject: [PATCH] cfgfile: fix uninitialized scalar variable >=20 > CID 13323: > Uninitialized scalar variable. Using uninitialized value > cfg->num_sections when calling rte_cfgfile_close. >=20 > Fixes: eaafbad419bf ("cfgfile: library to interpret config files") >=20 > Signed-off-by: Michal Kobylinski > --- > lib/librte_cfgfile/rte_cfgfile.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cf= gfile.c > index 75625a2..d72052a 100644 > --- a/lib/librte_cfgfile/rte_cfgfile.c > +++ b/lib/librte_cfgfile/rte_cfgfile.c > @@ -232,6 +232,7 @@ rte_cfgfile_load(const char *filename, int flags) > return cfg; >=20 > error1: > + cfg->num_sections =3D curr_section + 1; > rte_cfgfile_close(cfg); > error2: > fclose(f); > -- > 1.9.1 Acked-by: Cristian Dumitrescu