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 74b192c..89b70f6 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) {