23 Jun
2008
23 Jun
'08
8:41 p.m.
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)
6708
Age (days ago)
6708
Last active (days ago)
0 comments
1 participants
participants (1)
-
Freeswitch SVN