[asterisk-commits] oej: trunk r227545 - /trunk/main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Nov 4 02:22:06 CST 2009


Author: oej
Date: Wed Nov  4 02:22:00 2009
New Revision: 227545

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=227545
Log:
Add destruction of iterators to avoid problems with refcounters

(per Russell's review of another patch)

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=227545&r1=227544&r2=227545
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Wed Nov  4 02:22:00 2009
@@ -1441,7 +1441,7 @@
 		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 @@
 			unref_mansession(session);
 		}
 	}
+	ao2_iterator_destroy(&i);
 }
 
 /*
@@ -4277,6 +4278,7 @@
 			ao2_unlock(session);
 			unref_mansession(session);
 		}
+		ao2_iterator_destroy(&i);
 	}
 
 	AST_RWLIST_RDLOCK(&manager_hooks);
@@ -4470,6 +4472,7 @@
 		ao2_unlock(session);
 		unref_mansession(session);
 	}
+	ao2_iterator_destroy(&i);
 
 	return session;
 }
@@ -4505,6 +4508,7 @@
 		ao2_unlock(session);
 		unref_mansession(session);
 	}
+	ao2_iterator_destroy(&i);
 	return session;
 }
 
@@ -4546,6 +4550,7 @@
 		ao2_unlock(session);
 		unref_mansession(session);
 	}
+	ao2_iterator_destroy(&i);
 	return result;
 }
 
@@ -4571,6 +4576,7 @@
 		ao2_unlock(session);
 		unref_mansession(session);
 	}
+	ao2_iterator_destroy(&i);
 	return result;
 }
 




More information about the asterisk-commits mailing list