[svn-commits] mjordan: branch 10 r361560 - in /branches/10: ./ apps/app_meetme.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Apr 6 15:32:17 CDT 2012


Author: mjordan
Date: Fri Apr  6 15:32:13 2012
New Revision: 361560

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=361560
Log:
Fix memory leak when using MeetMeAdmin 'e' option with user specified

A memory leak/reference counting leak occurs if the MeetMeAdmin 'e' command
(eject last user that joined) is used in conjunction with a specified user.
Regardless of the command being executed, if a user is specified for the
command, MeetMeAdmin will look up that user.  Because the 'e' option kicks
the last user that joined, as opposed to the one specified, the reference to
the user specified by the command would be leaked when the user variable
was assigned to the last user that joined.
........

Merged revisions 361558 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/apps/app_meetme.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_meetme.c?view=diff&rev=361560&r1=361559&r2=361560
==============================================================================
--- branches/10/apps/app_meetme.c (original)
+++ branches/10/apps/app_meetme.c Fri Apr  6 15:32:13 2012
@@ -4673,6 +4673,12 @@
 	case 101: /* e: Eject last user*/
 	{
 		int max_no = 0;
+
+		/* If they passed in a user, disregard it */
+		if (user) {
+			ao2_ref(user, -1);
+		}
+
 		ao2_callback(cnf->usercontainer, OBJ_NODATA, user_max_cmp, &max_no);
 		user = ao2_find(cnf->usercontainer, &max_no, 0);
 		if (!ast_test_flag64(&user->userflags, CONFFLAG_ADMIN))




More information about the svn-commits mailing list