Revision
15684
Author
rupa
Date
2009-11-26 00:59:57 -0600 (Thu, 26 Nov 2009)

Log Message

don't leak db connections (ok, only 1)

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c (15683 => 15684)


--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	2009-11-26 06:13:10 UTC (rev 15683)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	2009-11-26 06:59:57 UTC (rev 15684)
@@ -610,6 +610,7 @@
 	vm_profile_t *profile = NULL;
 	switch_xml_t x_profiles, x_profile, cfg, xml, x_email, param;
 	switch_event_t *event = NULL;
+	switch_cache_db_handle_t *dbh;
 
 	if (!(xml = switch_xml_open_cfg(global_cf, &cfg, NULL))) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf);
@@ -621,7 +622,6 @@
 
 	if ((x_profile = switch_xml_find_child(x_profiles, "profile", "name", profile_name))) {
 		switch_memory_pool_t *pool;
-		switch_cache_db_handle_t *dbh;
 		int x, count;
 		char *errmsg;
 
@@ -707,6 +707,7 @@
 	}
 
   end:
+	switch_cache_db_release_db_handle(&dbh);
 	if (xml) {
 		switch_xml_free(xml);
 	}