fix little leak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8830 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-06-23 20:41:45 +00:00
parent d942676113
commit f1b9b6dc5f
1 changed files with 7 additions and 2 deletions

View File

@ -625,7 +625,7 @@ static void load_mime_types(void)
fd = open(mime_path, O_RDONLY); fd = open(mime_path, O_RDONLY);
if (fd <= 0) { if (fd <= 0) {
return; goto end;
} }
while ((switch_fd_read_line(fd, line_buf, sizeof(line_buf)))) { while ((switch_fd_read_line(fd, line_buf, sizeof(line_buf)))) {
@ -656,6 +656,11 @@ static void load_mime_types(void)
close(fd); close(fd);
fd = -1; fd = -1;
} }
end:
switch_safe_free(mime_path);
} }
SWITCH_DECLARE(void) switch_core_setrlimits(void) SWITCH_DECLARE(void) switch_core_setrlimits(void)