numam-dpdk/lib/librte_cfgfile
Dmitriy Yakovlev e7ee2ca1c9 cfgfile: fix uninitialized variable on load error
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: eaafbad419 ("cfgfile: library to interpret config files")

Signed-off-by: Dmitriy Yakovlev <bombermag@gmail.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-02-14 18:13:48 +01:00
..
Makefile cfgfile: increase entry name and value sizes 2015-10-22 18:35:11 +02:00
rte_cfgfile_version.map cfgfile: support looking up sections by index 2016-02-29 11:28:31 +01:00
rte_cfgfile.c cfgfile: fix uninitialized variable on load error 2017-02-14 18:13:48 +01:00
rte_cfgfile.h cfgfile: fix API comments 2016-11-06 23:34:40 +01:00