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

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


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

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/86/4886/1

diff --git a/main/stasis_channels.c b/main/stasis_channels.c
index 496def8..d2acbe1 100644
--- a/main/stasis_channels.c
+++ b/main/stasis_channels.c
@@ -197,6 +197,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/4886
To unsubscribe, visit https://gerrit.asterisk.org/settings

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



More information about the asterisk-code-review mailing list