[Asterisk-code-review] res_rtp_asterisk.c: Fixed memory leak (asterisk[16])

Friendly Automation asteriskteam at digium.com
Tue May 19 13:23:11 CDT 2020


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14430 )

Change subject: res_rtp_asterisk.c: Fixed memory leak
......................................................................

res_rtp_asterisk.c: Fixed memory leak

Added freeifaddrs() for memory releasing.

ASTERISK-28904

Change-Id: I109403866e85a30659351946903a679de9727a8f
---
M res/res_rtp_asterisk.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 3bcfada..28fa12a 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -3578,6 +3578,7 @@
 					pj_sockaddr_get_len(&pjtmp));
 			++count;
 		}
+		freeifaddrs(ifa);
 	}
 
 	/* If configured to use a STUN server to get our external mapped address do so */

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14430
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I109403866e85a30659351946903a679de9727a8f
Gerrit-Change-Number: 14430
Gerrit-PatchSet: 1
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200519/5ceab690/attachment-0001.html>


More information about the asterisk-code-review mailing list