]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_rtp_asterisk: Free payload when error on insertion to data buffer
authorPirmin Walthert <infos@nappsoft.ch>
Tue, 14 Apr 2020 15:31:15 +0000 (17:31 +0200)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Wed, 15 Apr 2020 19:01:03 +0000 (14:01 -0500)
commit26dec6659883d5145a13e09465dbf0504f06cefe
tree7246b548f1406336c7e770564053eafc89ea9eff
parent77e2afe8cc9ca04753455d5fe4928ce176ab4978
res_rtp_asterisk: Free payload when error on insertion to data buffer

When the ast_data_buffer_put rejects to add a packet, for example because
the buffer already contains a packet with the same sequence number, the
payload will never be freed, resulting in a memory leak.

The data buffer will now return an error if this situation occurs
allowing the caller to free the payload. The res_rtp_asterisk module
has also been updated to do this.

ASTERISK-28826

Change-Id: Ie6c49495d1c921d5f997651c7d0f79646f095cf1
main/data_buffer.c
res/res_rtp_asterisk.c