[Asterisk-code-review] res ari: fix memory leak for channelvars (asterisk[master])

Sébastien Duthil asteriskteam at digium.com
Fri Feb 3 16:04:23 CST 2017


Sébastien Duthil has uploaded a new change for review. ( https://gerrit.asterisk.org/4885 )

Change subject: res_ari: fix memory leak for channelvars
......................................................................

res_ari: fix memory leak for channelvars

In ari.conf, when setting the option channelvars, every Stasis channel
snapshot would create a list of variable/value that would not be freed
when the snapshot is freed, resulting in a often-recurring memory
leak.

ASTERISK-26767 #close

Change-Id: Ia37dd9d68063d7f879193df02ede293e5ded716d
---
M main/stasis_channels.c
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/4885/1

diff --git a/main/stasis_channels.c b/main/stasis_channels.c
index 4897af8..dd71b86 100644
--- a/main/stasis_channels.c
+++ b/main/stasis_channels.c
@@ -195,6 +195,7 @@
 
 	ast_string_field_free_memory(snapshot);
 	ao2_cleanup(snapshot->manager_vars);
+	ao2_cleanup(snapshot->ari_vars);
 }
 
 struct ast_channel_snapshot *ast_channel_snapshot_create(struct ast_channel *chan)

-- 
To view, visit https://gerrit.asterisk.org/4885
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia37dd9d68063d7f879193df02ede293e5ded716d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sébastien Duthil <sduthil at wazo.community>



More information about the asterisk-code-review mailing list