]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Gotta actually free the frame...
authorMark Spencer <markster@digium.com>
Fri, 7 Nov 2003 03:48:03 +0000 (03:48 +0000)
committerMark Spencer <markster@digium.com>
Fri, 7 Nov 2003 03:48:03 +0000 (03:48 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1704 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channel.c

index 74b192c112a5fbbc85e67fc728d80328da2357db..89b70f6fee4bd988c06f6982a770031dd0981f96 100755 (executable)
--- a/channel.c
+++ b/channel.c
@@ -1064,8 +1064,10 @@ struct ast_frame *ast_read(struct ast_channel *chan)
                f = chan->pvt->readq;
                chan->pvt->readq = f->next;
                /* Interpret hangup and return NULL */
-               if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))
+               if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
+                       ast_frfree(f);
                        f = NULL;
+               }
        } else {
                chan->blocker = pthread_self();
                if (chan->exception) {