From: Sebastien Duthil Date: Fri, 3 Feb 2017 21:26:23 +0000 (-0500) Subject: res_ari: fix memory leak for channelvars X-Git-Tag: 14.3.0-rc1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9beac807127f436d0955205f7e63b985b12eb44;p=thirdparty%2Fasterisk.git 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 --- diff --git a/main/stasis_channels.c b/main/stasis_channels.c index 496def8682..d2acbe14c9 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)