Revision
15114
Author
anthm
Date
2009-10-08 09:01:03 -0500 (Thu, 08 Oct 2009)

Log Message

fix file handle mem leak (thanks pressuerman)

Modified Paths

Diff

Modified: freeswitch/trunk/src/switch_core_file.c (15113 => 15114)


--- freeswitch/trunk/src/switch_core_file.c	2009-10-08 13:21:19 UTC (rev 15113)
+++ freeswitch/trunk/src/switch_core_file.c	2009-10-08 14:01:03 UTC (rev 15114)
@@ -58,6 +58,8 @@
 		return SWITCH_STATUS_FALSE;
 	}
 
+	fh->flags = flags;
+
 	if (pool) {
 		fh->memory_pool = pool;
 	} else {
@@ -118,7 +120,7 @@
 	fh->file = file;
 	fh->func = func;
 	fh->line = line;
-	fh->flags = flags;
+
 	
 	if (spool_path) {
 		char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];