[svn-commits] mmichelson: branch 1.6.1 r188596 - in /branches/1.6.1: ./ main/file.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Apr 15 15:20:27 CDT 2009


Author: mmichelson
Date: Wed Apr 15 15:20:23 2009
New Revision: 188596

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=188596
Log:
Merged revisions 188585 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r188585 | mmichelson | 2009-04-15 15:17:33 -0500 (Wed, 15 Apr 2009) | 13 lines
  
  Merged revisions 188582 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r188582 | mmichelson | 2009-04-15 15:04:20 -0500 (Wed, 15 Apr 2009) | 7 lines
    
    Update ast_readvideo_callback to match ast_readaudio_callback.
    
    This fixes potential refcount errors that may occur on ast_filestreams.
    
    AST-208
  ........
................

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/file.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/file.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/file.c?view=diff&rev=188596&r1=188595&r2=188596
==============================================================================
--- branches/1.6.1/main/file.c (original)
+++ branches/1.6.1/main/file.c Wed Apr 15 15:20:23 2009
@@ -778,11 +778,16 @@
 			ast_set_flag(fr, AST_FRFLAG_FROM_FILESTREAM);
 			ao2_ref(s, +1);
 		}
-		if (!fr || ast_write(s->owner, fr)) { /* no stream or error, as above */
-			if (fr)
+		if (!fr /* stream complete */ || ast_write(s->owner, fr) /* error writing */) {
+			if (fr) {
 				ast_log(LOG_WARNING, "Failed to write frame\n");
+				ast_frfree(fr);
+			}
 			s->owner->vstreamid = -1;
 			return FSREAD_FAILURE;
+		}
+		if (fr) {
+			ast_frfree(fr);
 		}
 	}
 




More information about the svn-commits mailing list