aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-29 16:26:57 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-29 16:26:57 +0000
commit7462f8a2525d23d5040b2001230963e505b6d1d2 (patch)
tree43e0d8aa0417ec4f092c2751f48ad3cf8536d97b
parent0565f3183fe4a456bc7949c5e26f0372fd22ba98 (diff)
Fix user reference leak in MeetMe.
We were unlinking the user from the conferences user container, but not decrementing the reference count of the user as well, resulting in a leak. (closes issue #18444) Reported by: junky Tested by: seanbright git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@304726 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_meetme.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 10f73b5e5..64a9686c1 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -3387,9 +3387,8 @@ bailoutandtrynormal:
ast_dsp_free(dsp);
}
- if (!user->user_no) {
- ao2_ref(user, -1);
- } else { /* Only cleanup users who really joined! */
+ if (user->user_no) {
+ /* Only cleanup users who really joined! */
now = ast_tvnow();
hr = (now.tv_sec - user->jointime) / 3600;
min = ((now.tv_sec - user->jointime) % 3600) / 60;
@@ -3443,6 +3442,7 @@ bailoutandtrynormal:
pbx_builtin_setvar_helper(chan, "MEETMEBOOKID", conf->bookid);
}
}
+ ao2_ref(user, -1);
AST_LIST_UNLOCK(&confs);
return ret;