[Asterisk-code-review] res_rtp_asterisk: Free payload when error on insertion to data buffer (asterisk[16])

Joshua Colp asteriskteam at digium.com
Wed Apr 15 04:45:03 CDT 2020


Joshua Colp has uploaded a new patch set (#2) to the change originally created by nappsoft. ( https://gerrit.asterisk.org/c/asterisk/+/14207 )

Change subject: res_rtp_asterisk: Free payload when error on insertion to data buffer
......................................................................

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
---
M main/data_buffer.c
M res/res_rtp_asterisk.c
2 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/07/14207/2
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14207
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ie6c49495d1c921d5f997651c7d0f79646f095cf1
Gerrit-Change-Number: 14207
Gerrit-PatchSet: 2
Gerrit-Owner: nappsoft <infos at nappsoft.ch>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200415/d64199e8/attachment.html>


More information about the asterisk-code-review mailing list