cfgfile: fix uninitialized variable on load error
CID 13323:
Uninitialized scalar variable. Using uninitialized value
cfg->num_sections when calling rte_cfgfile_close.
Fixes: eaafbad419
("cfgfile: library to interpret config files")
Signed-off-by: Michal Kobylinski <michalx.kobylinski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
This commit is contained in:
parent
182d91f35b
commit
907dd23866
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user