mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
fix memory leak due to not freeing the channel's string fields in
ast_channel_destroy() (issue #6746) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1006,6 +1006,7 @@ void ast_channel_free(struct ast_channel *chan)
|
|||||||
while ((vardata = AST_LIST_REMOVE_HEAD(headp, entries)))
|
while ((vardata = AST_LIST_REMOVE_HEAD(headp, entries)))
|
||||||
ast_var_delete(vardata);
|
ast_var_delete(vardata);
|
||||||
|
|
||||||
|
ast_string_field_free_all(chan);
|
||||||
free(chan);
|
free(chan);
|
||||||
AST_LIST_UNLOCK(&channels);
|
AST_LIST_UNLOCK(&channels);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user