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:
Anthony Minessale
2007-12-12 14:16:24 +00:00
parent 54309a7b5e
commit 59e8656698
3 changed files with 26 additions and 3 deletions
+9 -1
View File
@@ -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)
{
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;
}