From: Michal Kobylinski <michalx.kobylinski@intel.com>
To: dev@dpdk.org, cristian.dumitrescu@intel.com
Cc: Michal Kobylinski <michalx.kobylinski@intel.com>
Subject: [dpdk-dev] [PATCH] cfgfile: fix uninitialized scalar variable
Date: Wed, 13 Apr 2016 14:15:02 +0200 [thread overview]
Message-ID: <1460549702-16733-1-git-send-email-michalx.kobylinski@intel.com> (raw)
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
next reply other threads:[~2016-04-13 12:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 12:15 Michal Kobylinski [this message]
2016-04-28 10:48 ` Dumitrescu, Cristian
2016-05-02 13:00 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460549702-16733-1-git-send-email-michalx.kobylinski@intel.com \
--to=michalx.kobylinski@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).