fix a couple places that would leak a frame

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2006-06-11 20:45:06 +00:00
parent 33661e9258
commit 59224d0f9f

View File

@@ -234,11 +234,13 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
myf.f.data = myf.frdata;
if (ast_write(chan, &myf.f) < 0) {
res = -1;
ast_frfree(f);
break;
}
if (res < needed) { /* last frame */
ast_log(LOG_DEBUG, "Last frame\n");
res=0;
ast_frfree(f);
break;
}
} else {