From da3cf563ba87b9cd244f931cfe5c23d17dabafd5 Mon Sep 17 00:00:00 2001 From: russell Date: Thu, 11 May 2006 20:07:44 +0000 Subject: - The recent change to linklists.h broke the build on linux for some reason. So, I have removed all of the uses of AST_LIST_HEAD_INIT and replaced them with the equivalent static initializations. - On passing, fix a memory leak in the unload_module() function of chan_agent. The agents list mutex was never destroyed, and the elements in the agents list were not freed. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26990 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_externalivr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c index ecc8bf888..e29a3655e 100644 --- a/apps/app_externalivr.c +++ b/apps/app_externalivr.c @@ -258,14 +258,14 @@ static int app_exec(struct ast_channel *chan, void *data) FILE *child_commands = NULL; FILE *child_errors = NULL; FILE *child_events = NULL; - struct ivr_localuser foo, *u = &foo; - - bzero(u, sizeof(*u)); + struct ivr_localuser foo = { + .playlist = AST_LIST_HEAD_INIT_VALUE, + .finishlist = AST_LIST_HEAD_INIT_VALUE, + }; + struct ivr_localuser *u = &foo; LOCAL_USER_ADD(lu); - AST_LIST_HEAD_INIT(&u->playlist); - AST_LIST_HEAD_INIT(&u->finishlist); u->abort_current_sound = 0; u->chan = chan; -- cgit v1.2.3