summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/channel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index 9ba5fb600..32d559d0f 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4701,6 +4701,9 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
AST_LIST_NEXT(cur, frame_list) = NULL;
ast_frfree(cur);
}
+ if (new_frame != dup) {
+ ast_frfree(new_frame);
+ }
cur = dup;
}
}