[asterisk-commits] seanbright: branch 1.6.2 r304729 - /branches/1.6.2/apps/app_meetme.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 29 11:01:56 CST 2011


Author: seanbright
Date: Sat Jan 29 11:01:51 2011
New Revision: 304729

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=304729
Log:
Make sure that we unref the correct object when ejecting the most recent caller.

Currently, when we kick the last user to enter, we decrement our own reference
count which results in a crash when we kick another user or when we exit the
conference ourselves.

Modified:
    branches/1.6.2/apps/app_meetme.c

Modified: branches/1.6.2/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/apps/app_meetme.c?view=diff&rev=304729&r1=304728&r2=304729
==============================================================================
--- branches/1.6.2/apps/app_meetme.c (original)
+++ branches/1.6.2/apps/app_meetme.c Sat Jan 29 11:01:51 2011
@@ -2052,7 +2052,6 @@
 static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int confflags, char *optargs[])
 {
 	struct ast_conf_user *user = NULL;
-	struct ast_conf_user *usr = NULL;
 	int fd;
 	struct dahdi_confinfo dahdic, dahdic_empty;
 	struct ast_frame *f;
@@ -3055,6 +3054,7 @@
 								break;
 							case '3': /* Eject last user */
 							{
+								struct ast_conf_user *usr = NULL;
 								int max_no = 0;
 								menu_active = 0;
 								ao2_callback(conf->usercontainer, OBJ_NODATA, user_max_cmp, &max_no);
@@ -3065,7 +3065,7 @@
 								} else {
 									usr->adminflags |= ADMINFLAG_KICKME;
 								}
-								ao2_ref(user, -1);
+								ao2_ref(usr, -1);
 								ast_stopstream(chan);
 								break;
 							}




More information about the asterisk-commits mailing list