diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-30 19:46:37 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-30 19:46:37 +0000 |
commit | dc1df0f35c1bd8bd527984263753bff92e0c4c20 (patch) | |
tree | 397ac7960d06bdc4f5e95dc5d01e7f8b4b708307 /main/autoservice.c | |
parent | 3fa10b17c85e4faa15c2405dd98d59d71bc3390e (diff) |
Fix a bug I found while testing for another issue.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@119354 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/autoservice.c')
-rw-r--r-- | main/autoservice.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/main/autoservice.c b/main/autoservice.c index b22ea2bc9..a967388cb 100644 --- a/main/autoservice.c +++ b/main/autoservice.c @@ -160,21 +160,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); } } |