changeset 33397:30e60125c2f4

Add missing m_option_free() to m_config_free(). When freeing a config object, free allocated memory (to a program-accessible option variable) after freeing the save slots of an option as well.
author ib
date Sun, 22 May 2011 20:32:42 +0000
parents 580141f51e13
children 3feb6b8799a1
files m_config.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/m_config.c	Sun May 22 20:19:28 2011 +0000
+++ b/m_config.c	Sun May 22 20:32:42 2011 +0000
@@ -201,6 +201,8 @@
     }
     if(i->name != i->opt->name)
       free(i->name);
+    if(i->opt->p && (i->opt->type->flags & M_OPT_TYPE_DYNAMIC))
+      m_option_free(i->opt, i->opt->p);
     ct = i->next;
     free(i);
     i = ct;