It used to leave the config in a corrupt state that
referenced freed memory and leaked any added entries.
This did not cause any actual problems because no
config structure was ever reused in production code,
only in tests which do that for convenience.
Change-Id: I90a52c31ca2985ab9c67b32849bca426fb3f1ed7 Signed-off-by: Michal Bloch <m.bloch@samsung.com>