All of lore.kernel.org
 help / color / mirror / Atom feed
* [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 related	[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 [PATCH] cfgfile: fix uninitialized scalar variable Michal Kobylinski
2016-04-28 10:48 ` Dumitrescu, Cristian
2016-05-02 13:00   ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.