[asterisk-commits] russell: trunk r167569 - in /trunk: ./ main/file.c

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


Author: russell
Date: Wed Jan  7 16:36:34 2009
New Revision: 167569

URL: http://svn.digium.com/view/asterisk?view=rev&rev=167569
Log:
Merged revisions 167566 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r167566 | russell | 2009-01-07 16:35:36 -0600 (Wed, 07 Jan 2009) | 2 lines

Fix the last couple of places where free() was improperly used directly.

........

Modified:
    trunk/   (props changed)
    trunk/main/file.c

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

Modified: trunk/main/file.c
URL: http://svn.digium.com/view/asterisk/trunk/main/file.c?view=diff&rev=167569&r1=167568&r2=167569
==============================================================================
--- trunk/main/file.c (original)
+++ trunk/main/file.c Wed Jan  7 16:36:34 2009
@@ -965,11 +965,11 @@
 
 		if (!bfile || (fs = get_filestream(f, bfile)) == NULL || open_wrapper(fs) ) {
 			ast_log(LOG_WARNING, "Unable to open %s\n", fn);
-			if (fs)
-				ast_free(fs);
+			if (fs) {
+				ast_closestream(fs);
+			}
 			fs = NULL;
-			if (bfile)
-				fclose(bfile);
+			bfile = NULL;
 			ast_free(fn);
 			break;				
 		}
@@ -1079,9 +1079,10 @@
 					unlink(fn);
 					unlink(orig_fn);
 				}
-				if (fs)
-					ast_free(fs);
-				fs = NULL;
+				if (fs) {
+					ast_closestream(fs);
+					fs = NULL;
+				}
 				continue;
 			}
 			fs->trans = NULL;




More information about the asterisk-commits mailing list