From aaef33cccfecfcd3b2cf3a5782db6611d108ae4a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 14 Apr 2011 17:44:18 -0500 Subject: [PATCH] clear pointer on release --- src/switch_core_sqldb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index 7f2c9c712f..940b1c4698 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -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;