Merged revisions 280450 via svnmerge from
[asterisk/asterisk.git] / main / channel.c
index 9ba5fb6..32d559d 100644 (file)
@@ -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);
                                                }
                                                        AST_LIST_NEXT(cur, frame_list) = NULL;
                                                        ast_frfree(cur);
                                                }
+                                               if (new_frame != dup) {
+                                                       ast_frfree(new_frame);
+                                               }
                                                cur = dup;
                                        }
                                }
                                                cur = dup;
                                        }
                                }