[asterisk-commits] branch 1.0 - r7914 /branches/1.0/pbx/pbx_spool.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jan 9 16:03:43 CST 2006


Author: russell
Date: Mon Jan  9 16:03:42 2006
New Revision: 7914

URL: http://svn.digium.com/view/asterisk?rev=7914&view=rev
Log:
fix memory leak with DelayedRetry (issue #6157)

Modified:
    branches/1.0/pbx/pbx_spool.c

Modified: branches/1.0/pbx/pbx_spool.c
URL: http://svn.digium.com/view/asterisk/branches/1.0/pbx/pbx_spool.c?rev=7914&r1=7913&r2=7914&view=diff
==============================================================================
--- branches/1.0/pbx/pbx_spool.c (original)
+++ branches/1.0/pbx/pbx_spool.c Mon Jan  9 16:03:42 2006
@@ -271,9 +271,11 @@
 #endif
 				fclose(f);
 				if (o->retries <= o->maxretries) {
+					now += o->retrytime;
 					if (o->callingpid && (o->callingpid == ast_mainpid)) {
 						safe_append(o, time(NULL), "DelayedRetry");
 						ast_log(LOG_DEBUG, "Delaying retry since we're currently running '%s'\n", o->fn);
+						free(o);
 					} else {
 						/* Increment retries */
 						o->retries++;
@@ -285,7 +287,6 @@
 						safe_append(o, now, "StartRetry");
 						launch_service(o);
 					}
-					now += o->retrytime;
 					return now;
 				} else {
 					ast_log(LOG_EVENT, "Queued call to %s/%s expired without completion after %d attempt(s)\n", o->tech, o->dest, o->retries - 1);



More information about the asterisk-commits mailing list