diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index d9b0eac6a48d503111872d9754bd2e59d1d28b90..2293ca9ab7906d96cc1b11a697c9ea9fcdd229c6 100644
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -387,8 +387,8 @@ static int scan_service(char *fn, time_t now, time_t atime)
 					now += o->retrytime;
 					if (o->callingpid && (o->callingpid == ast_mainpid)) {
 						safe_append(o, time(NULL), "DelayedRetry");
-						free_outgoing(o);
 						ast_log(LOG_DEBUG, "Delaying retry since we're currently running '%s'\n", o->fn);
+						free_outgoing(o);
 					} else {
 						/* Increment retries */
 						o->retries++;