mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 09:58:17 +00:00
add missing code to free pools in certian conditions that were overlooked
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6699 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -143,10 +143,17 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_get_string(switch_file_handle_t
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh)
|
||||
{
|
||||
switch_status_t status;
|
||||
|
||||
switch_assert(fh != NULL);
|
||||
switch_assert(fh->file_interface != NULL);
|
||||
|
||||
switch_clear_flag(fh, SWITCH_FILE_OPEN);
|
||||
return fh->file_interface->file_close(fh);
|
||||
status = fh->file_interface->file_close(fh);
|
||||
|
||||
if (switch_test_flag(fh, SWITCH_FILE_FLAG_FREE_POOL)) {
|
||||
switch_core_destroy_memory_pool(&fh->memory_pool);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user