diff options
author | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-31 10:27:40 +0000 |
---|---|---|
committer | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-31 10:27:40 +0000 |
commit | e43bf450f58a695299f484745199a01f379c8220 (patch) | |
tree | 8ba7c9c09d641ab39c59629f7d9268bde16d0870 | |
parent | 2b66a6e2bec72a501a9c7fd24507b53ebcd657e4 (diff) |
a few 10l fixes by Wei Jiang <jiangw98@yahoo.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13825 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | m_config.c | 9 |
1 files changed, 7 insertions, 2 deletions
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; |