mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-02 06:38:04 +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:
parent
54309a7b5e
commit
59e8656698
@ -125,9 +125,17 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_resume(switch_asr_handle_t *ah)
|
|||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_close(switch_asr_handle_t *ah, switch_asr_flag_t *flags)
|
SWITCH_DECLARE(switch_status_t) switch_core_asr_close(switch_asr_handle_t *ah, switch_asr_flag_t *flags)
|
||||||
{
|
{
|
||||||
|
switch_status_t status;
|
||||||
|
|
||||||
switch_assert(ah != NULL);
|
switch_assert(ah != NULL);
|
||||||
|
|
||||||
return ah->asr_interface->asr_close(ah, flags);
|
status = ah->asr_interface->asr_close(ah, flags);
|
||||||
|
|
||||||
|
if (switch_test_flag(ah, SWITCH_ASR_FLAG_FREE_POOL)) {
|
||||||
|
switch_core_destroy_memory_pool(&ah->memory_pool);
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_feed(switch_asr_handle_t *ah, void *data, unsigned int len, switch_asr_flag_t *flags)
|
SWITCH_DECLARE(switch_status_t) switch_core_asr_feed(switch_asr_handle_t *ah, void *data, unsigned int len, switch_asr_flag_t *flags)
|
||||||
|
@ -73,6 +73,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_directory_next_pair(switch_directory
|
|||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_directory_close(switch_directory_handle_t *dh)
|
SWITCH_DECLARE(switch_status_t) switch_core_directory_close(switch_directory_handle_t *dh)
|
||||||
{
|
{
|
||||||
return dh->directory_interface->directory_close(dh);
|
switch_status_t status;
|
||||||
|
|
||||||
|
status = dh->directory_interface->directory_close(dh);
|
||||||
|
|
||||||
|
if (switch_test_flag(dh, SWITCH_DIRECTORY_FLAG_FREE_POOL)) {
|
||||||
|
switch_core_destroy_memory_pool(&dh->memory_pool);
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh)
|
||||||
{
|
{
|
||||||
|
switch_status_t status;
|
||||||
|
|
||||||
switch_assert(fh != NULL);
|
switch_assert(fh != NULL);
|
||||||
switch_assert(fh->file_interface != NULL);
|
switch_assert(fh->file_interface != NULL);
|
||||||
|
|
||||||
switch_clear_flag(fh, SWITCH_FILE_OPEN);
|
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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user