[asterisk-commits] bbryant: branch 1.6.2 r288006 - in /branches/1.6.2: ./ main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 21 14:46:24 CDT 2010


Author: bbryant
Date: Tue Sep 21 14:46:20 2010
New Revision: 288006

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=288006
Log:
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
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/channel.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: branches/1.6.2/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/channel.c?view=diff&rev=288006&r1=288005&r2=288006
==============================================================================
--- branches/1.6.2/main/channel.c (original)
+++ branches/1.6.2/main/channel.c Tue Sep 21 14:46:20 2010
@@ -1019,7 +1019,9 @@
 	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;
 		}




More information about the asterisk-commits mailing list