diff options
author | Joshua Colp <jcolp@digium.com> | 2015-05-14 15:19:55 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2015-05-14 15:19:55 -0500 |
commit | aea349a87e56b43c1d13ef73021667279ebb1dd9 (patch) | |
tree | 10d90951634443bb72157134d87c1c107a387e08 | |
parent | 8f8d54a18eac54bd192b8c9c0c754d88afcaa7e3 (diff) | |
parent | 02c513058905dae19f28393ea840a47ae4a9e66d (diff) |
Merge "Message.c: Clear message channel frames on cleanup" into 13
-rw-r--r-- | main/message.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/main/message.c b/main/message.c index 581487fcd..01a1c9b1c 100644 --- a/main/message.c +++ b/main/message.c @@ -743,6 +743,7 @@ static void chan_cleanup(struct ast_channel *chan) struct ast_datastore *msg_ds, *ds; struct varshead *headp; struct ast_var_t *vardata; + struct ast_frame *cur; ast_channel_lock(chan); @@ -772,6 +773,13 @@ static void chan_cleanup(struct ast_channel *chan) } /* + * Remove frames from read queue + */ + while ((cur = AST_LIST_REMOVE_HEAD(ast_channel_readq(chan), frame_list))) { + ast_frfree(cur); + } + + /* * Restore msg datastore. */ if (msg_ds) { |