]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_rtp_asterisk: Add frame list cleanups to ast_rtp_read
authorGeorge Joseph <gjoseph@digium.com>
Wed, 4 Dec 2019 21:01:22 +0000 (14:01 -0700)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 10 Dec 2019 18:48:20 +0000 (12:48 -0600)
commit86822722b625326a33fe22f6a9c561bda62b14e5
tree7c54f6e7ed1836745052929a65619e19f8027979
parent5fb0d1d56272de1e2fdb5f4a74b1efbd8d2fcab7
res_rtp_asterisk:  Add frame list cleanups to ast_rtp_read

In Asterisk 16+, there are a few places in ast_rtp_read where we've
allocated a frame list but return a null frame instead of the list.
In these cases, any frames left in the list won't be freed.  In the
vast majority of the cases, the list is empty when we return so
there's nothing to free but there have been leaks reported in the
wild that can be traced back to frames left in the list before
returning.

The escape paths now all have logic to free frames left in the
list.

ASTERISK-28609
Reported by: Ted G

Change-Id: Ia1d7075857ebd26b47183c44b1aebb0d8f985f7a
res/res_rtp_asterisk.c