diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-21 19:48:53 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-21 19:48:53 +0000 |
commit | 24868df175aa264708c10f285e286c787ef8d4d5 (patch) | |
tree | 4875338a9265ec807c696ea09c8f192678c33e4b | |
parent | 2c36b9c1ae390b1ca851362158667fa932561b9e (diff) |
Merged revisions 288006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r288006 | bbryant | 2010-09-21 15:46:20 -0400 (Tue, 21 Sep 2010) | 14 lines
Merged revisions 288005 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r288005 | bbryant | 2010-09-21 15:43:46 -0400 (Tue, 21 Sep 2010) | 8 lines
Add a check to fix a rare segmentation fault you'd get if ast_frdup couldn't allocate
memory on the first frame being queued in ast_queue_frame.
(closes issue #17882)
Reported by: seanbright
Tested by: seanbright
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@288007 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/channel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c index b332dce1e..29066ebf8 100644 --- a/main/channel.c +++ b/main/channel.c @@ -1366,7 +1366,9 @@ static int __ast_queue_frame(struct ast_channel *chan, struct ast_frame *fin, in AST_LIST_HEAD_INIT_NOLOCK(&frames); for (cur = fin; cur; cur = AST_LIST_NEXT(cur, frame_list)) { if (!(f = ast_frdup(cur))) { - ast_frfree(AST_LIST_FIRST(&frames)); + if (AST_LIST_FIRST(&frames)) { + ast_frfree(AST_LIST_FIRST(&frames)); + } ast_channel_unlock(chan); return -1; } |