From: Joshua Colp Date: Fri, 30 May 2008 19:46:37 +0000 (+0000) Subject: Fix a bug I found while testing for another issue. X-Git-Tag: 1.4.21-rc1~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f123152faa3f3cf9e8d540110f9d60edf91c07f;p=thirdparty%2Fasterisk.git Fix a bug I found while testing for another issue. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119354 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/autoservice.c b/main/autoservice.c index b22ea2bc97..a967388cbb 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); } }