diff options
-rw-r--r-- | apps/app_voicemail.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 518b9e927..edf5d454b 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -4163,6 +4163,10 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st } } } + + /* If anything failed above, we still have this list to free */ + while ((vmtmp = AST_LIST_REMOVE_HEAD(&extensions, list))) + free_user(vmtmp); return res ? res : cmd; } |