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: eaafbad419bf ("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
..
2017-01-30 11:15:11 +01:00
2016-10-12 18:40:52 +02:00
2016-11-07 21:50:27 +01:00
2016-11-06 23:46:03 +01:00
2017-01-04 20:40:15 +01:00
2017-01-30 17:04:46 +01:00
2016-10-13 11:42:37 +02:00
2017-01-30 11:08:47 +01:00
2016-10-05 12:02:53 +02:00