[asterisk-commits] russell: branch 1.4 r167545 - /branches/1.4/main/file.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 7 16:19:47 CST 2009


Author: russell
Date: Wed Jan  7 16:19:47 2009
New Revision: 167545

URL: http://svn.digium.com/view/asterisk?view=rev&rev=167545
Log:
Only try to close the file if one was actually opened

Modified:
    branches/1.4/main/file.c

Modified: branches/1.4/main/file.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/file.c?view=diff&rev=167545&r1=167544&r2=167545
==============================================================================
--- branches/1.4/main/file.c (original)
+++ branches/1.4/main/file.c Wed Jan  7 16:19:47 2009
@@ -334,7 +334,8 @@
 		free(f->realfilename);
 	if (f->fmt->close)
 		f->fmt->close(f);
-	fclose(f->f);
+	if (f->f)
+		fclose(f->f);
 	if (f->vfs)
 		ast_closestream(f->vfs);
 	if (f->orig_chan_name)




More information about the asterisk-commits mailing list