diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-04 08:22:00 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-04 08:22:00 +0000 |
commit | 193dd912da7f8491fa282ec55a4bc3786c94b6ca (patch) | |
tree | e234fb8a75ed4f4337ca44424f9ec9acde49768c /main | |
parent | 6c1dc06922ebc8ae74529f463b4c612bee64bdc4 (diff) |
Add destruction of iterators to avoid problems with refcounters
(per Russell's review of another patch)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227545 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/manager.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/manager.c b/main/manager.c index a5fc42759..e618a2fef 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1441,7 +1441,7 @@ static char *handle_showmanconn(struct ast_cli_entry *e, int cmd, struct ast_cli ao2_unlock(session); unref_mansession(session); } - + ao2_iterator_destroy(&i); ast_cli(a->fd, "%d users connected.\n", count); return CLI_SUCCESS; @@ -4181,6 +4181,7 @@ static void purge_sessions(int n_max) unref_mansession(session); } } + ao2_iterator_destroy(&i); } /* @@ -4277,6 +4278,7 @@ int __manager_event(int category, const char *event, ao2_unlock(session); unref_mansession(session); } + ao2_iterator_destroy(&i); } AST_RWLIST_RDLOCK(&manager_hooks); @@ -4470,6 +4472,7 @@ static struct mansession_session *find_session(uint32_t ident, int incinuse) ao2_unlock(session); unref_mansession(session); } + ao2_iterator_destroy(&i); return session; } @@ -4505,6 +4508,7 @@ static struct mansession_session *find_session_by_nonce(const char *username, un ao2_unlock(session); unref_mansession(session); } + ao2_iterator_destroy(&i); return session; } @@ -4546,6 +4550,7 @@ int astman_verify_session_readpermissions(uint32_t ident, int perm) ao2_unlock(session); unref_mansession(session); } + ao2_iterator_destroy(&i); return result; } @@ -4571,6 +4576,7 @@ int astman_verify_session_writepermissions(uint32_t ident, int perm) ao2_unlock(session); unref_mansession(session); } + ao2_iterator_destroy(&i); return result; } |