]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_ari: fix memory leak for channelvars 85/4885/1
authorSebastien Duthil <sduthil@wazo.community>
Fri, 3 Feb 2017 21:26:23 +0000 (16:26 -0500)
committerSebastien Duthil <sduthil@wazo.community>
Fri, 3 Feb 2017 21:42:52 +0000 (16:42 -0500)
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

main/stasis_channels.c

index 4897af89e7ee1682e6371a8d235e88fe15bf1a5f..dd71b8651235e53805991cca90984af5b6e4cd39 100644 (file)
@@ -195,6 +195,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)