e7ee2ca1c9
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@gmail.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>