aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/autoservice.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/main/autoservice.c b/main/autoservice.c
index df475fa70..636e95dd3 100644
--- a/main/autoservice.c
+++ b/main/autoservice.c
@@ -155,21 +155,20 @@ static void *autoservice_run(void *ign)
continue;
}
- for (i = 0; i < x; i++) {
- struct ast_frame *dup_f;
-
- if (mons[i] != chan) {
- continue;
- }
-
- if ((dup_f = ast_frdup(f))) {
- AST_LIST_INSERT_TAIL(&ents[i]->deferred_frames, dup_f, frame_list);
- }
-
- break;
- }
-
if (f) {
+ for (i = 0; i < x; i++) {
+ struct ast_frame *dup_f;
+
+ if (mons[i] != chan) {
+ continue;
+ }
+
+ if ((dup_f = ast_frdup(f))) {
+ AST_LIST_INSERT_TAIL(&ents[i]->deferred_frames, dup_f, frame_list);
+ }
+
+ break;
+ }
ast_frfree(f);
}
}