DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] cfgfile: fix uninitialized scalar variable
@ 2016-04-13 12:15 Michal Kobylinski
  2016-04-28 10:48 ` Dumitrescu, Cristian
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Kobylinski @ 2016-04-13 12:15 UTC (permalink / raw)
  To: dev, cristian.dumitrescu; +Cc: Michal Kobylinski

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 <michalx.kobylinski@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-02 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 12:15 [dpdk-dev] [PATCH] cfgfile: fix uninitialized scalar variable Michal Kobylinski
2016-04-28 10:48 ` Dumitrescu, Cristian
2016-05-02 13:00   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).