clear pointer on release

This commit is contained in:
Anthony Minessale 2011-04-14 17:44:18 -05:00
parent ceed7658e2
commit aaef33cccf
1 changed files with 2 additions and 0 deletions

View File

@ -289,6 +289,8 @@ SWITCH_DECLARE(void) switch_cache_db_release_db_handle(switch_cache_db_handle_t
switch_mutex_lock(sql_manager.dbh_mutex);
(*dbh)->last_used = switch_epoch_time_now(NULL);
(*dbh)->io_mutex = NULL;
if ((*dbh)->use_count) {
if (--(*dbh)->use_count == 0) {
(*dbh)->thread_hash = 1;