[asterisk-commits] file: trunk r48040 - /trunk/pbx/pbx_spool.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 27 08:48:58 MST 2006


Author: file
Date: Mon Nov 27 09:48:57 2006
New Revision: 48040

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48040
Log:
More fixes for referencing a structure after it has been freed. (issue #8425 reported by arkadia)

Modified:
    trunk/pbx/pbx_spool.c

Modified: trunk/pbx/pbx_spool.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_spool.c?view=diff&rev=48040&r1=48039&r2=48040
==============================================================================
--- trunk/pbx/pbx_spool.c (original)
+++ trunk/pbx/pbx_spool.c Mon Nov 27 09:48:57 2006
@@ -403,20 +403,20 @@
 					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, ((o->retries - 1) != 1) ? "s" : "");
+					remove_from_queue(o, "Expired");
 					free_outgoing(o);
-					remove_from_queue(o, "Expired");
 					return 0;
 				}
 			} else {
+				remove_from_queue(o, "Failed");
 				free_outgoing(o);
 				ast_log(LOG_WARNING, "Invalid file contents in %s, deleting\n", fn);
 				fclose(f);
-				remove_from_queue(o, "Failed");
 			}
 		} else {
+			remove_from_queue(o, "Failed");
 			free_outgoing(o);
 			ast_log(LOG_WARNING, "Unable to open %s: %s, deleting\n", fn, strerror(errno));
-			remove_from_queue(o, "Failed");
 		}
 	} else
 		ast_log(LOG_WARNING, "Out of memory :(\n");



More information about the asterisk-commits mailing list