aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-11 20:07:44 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-11 20:07:44 +0000
commitda3cf563ba87b9cd244f931cfe5c23d17dabafd5 (patch)
treef91bfa1dc51a7b5350dd534e72ed17e37cdd2b25 /pbx.c
parentd681ea85987a742eaa276d37b06ba2052c0a5cd0 (diff)
- 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
Diffstat (limited to 'pbx.c')
-rw-r--r--pbx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pbx.c b/pbx.c
index c5367943a..1a5f6f4c4 100644
--- a/pbx.c
+++ b/pbx.c
@@ -3465,15 +3465,13 @@ AST_LIST_HEAD(store_hints, store_hint);
void ast_merge_contexts_and_delete(struct ast_context **extcontexts, const char *registrar)
{
struct ast_context *tmp, *lasttmp = NULL;
- struct store_hints store;
+ struct store_hints store = AST_LIST_HEAD_INIT_VALUE;
struct store_hint *this;
struct ast_hint *hint;
struct ast_exten *exten;
int length;
struct ast_state_cb *thiscb, *prevcb;
- AST_LIST_HEAD_INIT(&store);
-
/* it is very important that this function hold the hint list lock _and_ the conlock
during its operation; not only do we need to ensure that the list of contexts
and extensions does not change, but also that no hint callbacks (watchers) are