[svn-commits] mmichelson: branch 11 r388378 - in /branches/11: ./ pbx/pbx_dundi.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri May 10 15:41:45 CDT 2013


Author: mmichelson
Date: Fri May 10 15:41:44 2013
New Revision: 388378

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388378
Log:
Fix memory leak in pbx_dundi

pbx_dundi added an io context without removing
it. This caused a memory leak when the module was
unloaded.

(closes ASTERISK-21718)
Reported by Corey Farrell
Patches:
	pbx_dundi-ast_io_remove.patch uploaded by Corey Farrell (License #5909)
........

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

Modified:
    branches/11/   (props changed)
    branches/11/pbx/pbx_dundi.c

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

Modified: branches/11/pbx/pbx_dundi.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/pbx/pbx_dundi.c?view=diff&rev=388378&r1=388377&r2=388378
==============================================================================
--- branches/11/pbx/pbx_dundi.c (original)
+++ branches/11/pbx/pbx_dundi.c Fri May 10 15:41:44 2013
@@ -2169,7 +2169,7 @@
 	   from the network, and queue them for delivery to the channels */
 	int res;
 	/* Establish I/O callback for socket read */
-	ast_io_add(io, netsocket, socket_read, AST_IO_IN, NULL);
+	int *socket_read_id = ast_io_add(io, netsocket, socket_read, AST_IO_IN, NULL);
 
 	while (!dundi_shutdown) {
 		res = ast_sched_wait(sched);
@@ -2184,6 +2184,7 @@
 		check_password();
 	}
 
+	ast_io_remove(io, socket_read_id);
 	netthreadid = AST_PTHREADT_NULL;
 
 	return NULL;




More information about the svn-commits mailing list