fix memory leak due to not freeing the channel's string fields in
authorRussell Bryant <russell@russellbryant.com>
Sun, 19 Mar 2006 21:01:04 +0000 (21:01 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sun, 19 Mar 2006 21:01:04 +0000 (21:01 +0000)
ast_channel_destroy() (issue #6746)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13628 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channel.c

index e804f7a..fdf2c97 100644 (file)
--- a/channel.c
+++ b/channel.c
@@ -1006,6 +1006,7 @@ void ast_channel_free(struct ast_channel *chan)
        while ((vardata = AST_LIST_REMOVE_HEAD(headp, entries)))
                ast_var_delete(vardata);
 
+       ast_string_field_free_all(chan);
        free(chan);
        AST_LIST_UNLOCK(&channels);