aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorautomerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-03 07:05:14 +0000
committerautomerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-03 07:05:14 +0000
commitcb50bff3b0af04be175ac975b6a5b99ba3ef50e7 (patch)
tree670dd02d1adf4d7c406d3febafad01ada99ba12b /apps
parent3147e5584fd5da5f3f93ee516300b032e927d491 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@57690 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 993e4df13..98bb8b96e 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3626,6 +3626,7 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
vmtmp = vmtmp->next;
free_user(vmfree);
}
+ extensions = NULL;
if (saved_messages > 0) {
/* give confirmation that the message was saved */
/* commented out since we can't forward batches yet
@@ -3639,6 +3640,13 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
}
}
}
+
+ /* If anything failed above, we still have this list to free */
+ while (extensions) {
+ vmfree = extensions;
+ extensions = extensions->next;
+ free_user(vmfree);
+ }
return res ? res : cmd;
}