]> 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:04:53 +0000 (08:04 -0600)
commite3038c3629344b42fa4d19a743ba35d37bc53959
tree84622d4d5be50226a90a938766baa7b5dcc12bf5
parent1cb7dd49a7e083a52854a58f8d4af9156e1310f4
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