summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorSebastien Duthil <sduthil@wazo.community>2017-02-03 16:26:23 -0500
committerSebastien Duthil <sduthil@wazo.community>2017-02-03 16:42:33 -0500
commitf9beac807127f436d0955205f7e63b985b12eb44 (patch)
tree97eee8d6a342ae5f8e6bb7d0585439b1cc0393f7 /main
parentfc7258b05314e8ed3145e7fd2eb2eda9293e8767 (diff)
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
Diffstat (limited to 'main')
-rw-r--r--main/stasis_channels.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/stasis_channels.c b/main/stasis_channels.c
index 496def868..d2acbe14c 100644
--- a/main/stasis_channels.c
+++ b/main/stasis_channels.c
@@ -197,6 +197,7 @@ static void channel_snapshot_dtor(void *obj)
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)