From: Mark Spencer Date: Wed, 19 Jul 2006 17:26:47 +0000 (+0000) Subject: Fix some reinitialization of prev! X-Git-Tag: 1.4.0-beta1~551 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b309345357ced31b3da187195db7cd98c86eba1;p=thirdparty%2Fasterisk.git Fix some reinitialization of prev! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37953 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/config.c b/config.c index 093af40f92..2cf5385bfb 100644 --- a/config.c +++ b/config.c @@ -346,6 +346,7 @@ int ast_variable_delete(struct ast_category *category, char *variable) cur = cur->next; } + prev = NULL; cur = category->root; while (cur) { if (!strcasecmp(cur->name, variable)) { @@ -392,6 +393,7 @@ int ast_variable_update(struct ast_category *category, char *variable, char *val cur = cur->next; } + prev = NULL; cur = category->root; while (cur) { if (!strcasecmp(cur->name, variable)) { @@ -438,6 +440,8 @@ int ast_category_delete(struct ast_config *cfg, char *category) prev = cat; cat = cat->next; } + + prev = NULL; cat = cfg->root; while(cat) { if (!strcasecmp(cat->name, category)) {