From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D890C292D for ; Wed, 13 Apr 2016 14:43:17 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 13 Apr 2016 05:43:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,479,1455004800"; d="scan'208";a="931513905" Received: from gklab-246-020.igk.intel.com (HELO Sent) ([10.217.246.20]) by orsmga001.jf.intel.com with SMTP; 13 Apr 2016 05:43:14 -0700 Received: by Sent (sSMTP sendmail emulation); Wed, 13 Apr 2016 14:15:14 +0200 From: Michal Kobylinski To: dev@dpdk.org, cristian.dumitrescu@intel.com Cc: Michal Kobylinski Date: Wed, 13 Apr 2016 14:15:02 +0200 Message-Id: <1460549702-16733-1-git-send-email-michalx.kobylinski@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [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: Wed, 13 Apr 2016 12:43:18 -0000 CID 13323: Uninitialized scalar variable. Using uninitialized value cfg->num_sections when calling rte_cfgfile_close. Fixes: eaafbad419bf ("cfgfile: library to interpret config files") Signed-off-by: Michal Kobylinski --- lib/librte_cfgfile/rte_cfgfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.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; error1: + cfg->num_sections = curr_section + 1; rte_cfgfile_close(cfg); error2: fclose(f); -- 1.9.1