From e43bf450f58a695299f484745199a01f379c8220 Mon Sep 17 00:00:00 2001 From: faust3 Date: Sun, 31 Oct 2004 10:27:40 +0000 Subject: a few 10l fixes by Wei Jiang git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13825 b3059339-0415-0410-9bf9-f77b7e298cf2 --- m_config.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'm_config.c') diff --git a/m_config.c b/m_config.c index 4d69869862..2223d0964e 100644 --- a/m_config.c +++ b/m_config.c @@ -32,7 +32,10 @@ m_config_free(m_config_t* config) { #endif while(i) { - sl = i->slots; + if (i->flags & M_CFG_OPT_ALIAS) + sl = NULL; + else + sl = i->slots; while(sl) { m_option_free(i->opt,sl->data); st = sl->prev; @@ -43,7 +46,7 @@ m_config_free(m_config_t* config) { free(i->name); ct = i->next; free(i); - ct = i; + i = ct; } free(config); } @@ -149,6 +152,7 @@ m_config_add_option(m_config_t *config, m_option_t *arg, char* prefix) { if(arg->type->flags & M_OPT_TYPE_HAS_CHILD) { m_option_t *ol = arg->p; int i; + co->slots = NULL; for(i = 0 ; ol[i].name != NULL ; i++) m_config_add_option(config,&ol[i], co->name); } else { @@ -174,6 +178,7 @@ m_config_add_option(m_config_t *config, m_option_t *arg, char* prefix) { m_option_set(arg,arg->p,sl->data); } sl->lvl = 0; + sl->prev = NULL; co->slots = (m_config_save_slot_t*)calloc(1,sizeof(m_config_save_slot_t) + arg->type->size); co->slots->prev = sl; co->slots->lvl = config->lvl; -- cgit v1.2.3