[dpdk-dev] [PATCH] cfgfile: fix uninitialized variable on load error

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Feb 14 18:14:27 CET 2017


> > Uninitialized scalar variable. Using uninitialized value cfg-
> > >sections[curr_section]->num_entries when calling rte_cfgfile_close.
> > And memory in variables cfg->sections[curr_section], sect-
> > >entries[curr_entry] maybe not equal NULL. We must decrement counters
> > curr_section, curr_entry when failed to realloc.
> > 
> > Fixes: eaafbad419bf ("cfgfile: library to interpret config files")
> > 
> > Signed-off-by: Dmitriy Yakovlev <bombermag at gmail.com>
> > ---
> >  lib/librte_cfgfile/rte_cfgfile.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> 
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>

Applied, thanks


More information about the dev mailing list