# HG changeset patch # User ib # Date 1306096362 0 # Node ID 30e60125c2f4007e6bc5a73154e738c728433058 # Parent 580141f51e13f12e5e67926bb5a5df6e8e1b41e5 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. diff -r 580141f51e13 -r 30e60125c2f4 m_config.c --- 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;