diff --git a/main/rtp.c b/main/rtp.c index 39593229df..5754710e80 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -2597,6 +2597,8 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *_f) f = _f; } ast_rtp_raw_write(rtp, f, codec); + if (f != _f) + ast_frfree(f); } return 0;