From: Anthony Minessale Date: Thu, 8 Oct 2009 14:01:03 +0000 (+0000) Subject: fix file handle mem leak (thanks pressuerman) X-Git-Tag: v1.0.6~1705 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ad32b8df11855979ba5c2e5977a540ee7de3d96;p=thirdparty%2Ffreeswitch.git fix file handle mem leak (thanks pressuerman) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15114 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_core_file.c b/src/switch_core_file.c index 620c2b51b1..dac692e44d 100644 --- a/src/switch_core_file.c +++ b/src/switch_core_file.c @@ -58,6 +58,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file, return SWITCH_STATUS_FALSE; } + fh->flags = flags; + if (pool) { fh->memory_pool = pool; } else { @@ -118,7 +120,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file, fh->file = file; fh->func = func; fh->line = line; - fh->flags = flags; + if (spool_path) { char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];