All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: "Kobylinski, MichalX" <michalx.kobylinski@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH] cfgfile: fix uninitialized scalar variable
Date: Thu, 28 Apr 2016 10:48:21 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D89126479A6E0F@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1460549702-16733-1-git-send-email-michalx.kobylinski@intel.com>



> -----Original Message-----
> From: Kobylinski, MichalX
> Sent: Wednesday, April 13, 2016 1:15 PM
> To: dev@dpdk.org; Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: Kobylinski, MichalX <michalx.kobylinski@intel.com>
> Subject: [PATCH] cfgfile: fix uninitialized scalar variable
> 
> 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

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

  reply	other threads:[~2016-04-28 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 12:15 [PATCH] cfgfile: fix uninitialized scalar variable Michal Kobylinski
2016-04-28 10:48 ` Dumitrescu, Cristian [this message]
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=3EB4FA525960D640B5BDFFD6A3D89126479A6E0F@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=michalx.kobylinski@intel.com \
    /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 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.