summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 5d0cf0bdd..a21ebf394 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7657,6 +7657,7 @@ static struct ast_frame *sip_read(struct ast_channel *ast)
if (ast_async_goto(ast, target_context, "fax", 1)) {
ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", ast_channel_name(ast), target_context);
}
+ ast_frfree(fr);
fr = &ast_null_frame;
} else {
ast_channel_lock(ast);
@@ -7668,6 +7669,7 @@ static struct ast_frame *sip_read(struct ast_channel *ast)
/* Only allow audio through if they sent progress with SDP, or if the channel is actually answered */
if (fr && fr->frametype == AST_FRAME_VOICE && p->invitestate != INV_EARLY_MEDIA && ast_channel_state(ast) != AST_STATE_UP) {
+ ast_frfree(fr);
fr = &ast_null_frame;
}