diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index e58b93ceda..402e9a4c14 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -2986,8 +2986,12 @@ static struct ast_frame *process_ast_dsp(struct chan_list *tmp, struct ast_frame return NULL; } - if (!f || (f->frametype != AST_FRAME_DTMF)) - return frame; + if (!f || (f->frametype != AST_FRAME_DTMF)) { + if (f) { + ast_frfree(f); + } + return frame; + } ast_debug(1, "Detected inband DTMF digit: %c\n", f->subclass);