diff options
Diffstat (limited to 'src/lib/util/options.c')
-rw-r--r-- | src/lib/util/options.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/util/options.c b/src/lib/util/options.c index ac7897fb6d3..9e7dbaeed08 100644 --- a/src/lib/util/options.c +++ b/src/lib/util/options.c @@ -224,7 +224,11 @@ core_options::~core_options() { // delete all entries from the list while (m_entrylist != NULL) + { + core_options::entry *e = m_entrylist; remove_entry(*m_entrylist); + delete e; + } } @@ -290,7 +294,11 @@ void core_options::add_entries(const options_entry *entrylist, bool override_exi { // if we're overriding existing entries, then remove the old one if (override_existing) + { + core_options::entry *e = m_entrylist; remove_entry(*existing); + delete e; + } // otherwise, just override the default and current values and throw out the new entry else @@ -608,7 +616,11 @@ void core_options::reset() { // remove all entries from the list while (m_entrylist != NULL) + { + core_options::entry *e = m_entrylist; remove_entry(*m_entrylist); + delete e; + } // reset the map m_entrymap.reset(); |