[Freeswitch-svn] [commit] r8830 - freeswitch/trunk/src
    Freeswitch SVN 
    anthm at freeswitch.org
       
    Mon Jun 23 16:41:45 EDT 2008
    
    
  
Author: anthm
Date: Mon Jun 23 16:41:45 2008
New Revision: 8830
Modified:
   freeswitch/trunk/src/switch_core.c
Log:
fix little leak
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c	(original)
+++ freeswitch/trunk/src/switch_core.c	Mon Jun 23 16:41:45 2008
@@ -625,9 +625,9 @@
 
 	fd = open(mime_path, O_RDONLY);
 	if (fd <= 0) {
-		return;
+		goto end;
 	}
-
+	
 	while ((switch_fd_read_line(fd, line_buf, sizeof(line_buf)))) {
 		char *p;
 		char *type = line_buf;
@@ -656,6 +656,11 @@
 		close(fd);
 		fd = -1;
 	}
+
+ end:
+
+	switch_safe_free(mime_path);
+
 }
 
 SWITCH_DECLARE(void) switch_core_setrlimits(void)
    
    
More information about the Freeswitch-svn
mailing list