From: Joshua Colp Date: Mon, 27 Nov 2006 15:48:57 +0000 (+0000) Subject: More fixes for referencing a structure after it has been freed. (issue #8425 reported... X-Git-Tag: 1.6.0-beta1~3^2~3863 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e333a782c9f3e019ccf5966cdb961af19d41ab8;p=thirdparty%2Fasterisk.git More fixes for referencing a structure after it has been freed. (issue #8425 reported by arkadia) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48040 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index 2293ca9ab7..6325f92ebf 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -403,20 +403,20 @@ static int scan_service(char *fn, time_t now, time_t atime) 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" : ""); - free_outgoing(o); remove_from_queue(o, "Expired"); + free_outgoing(o); 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");