]> 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>
Wed, 18 Dec 2019 14:05:17 +0000 (08:05 -0600)
commit27a4a3c761613904a6105aec6ff211e206cbbf67
tree7bf0c51ca458a8bfbd989968aaf2e5a358038f2a
parent7a73da2bf9ab36f7bd21fc78ab0dd0f88dbf2f4f
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