From 8c1dee5ac9cf6c95f043906064c05accfed6e3c6 Mon Sep 17 00:00:00 2001 From: Rupa Schomaker Date: Mon, 23 Mar 2009 15:34:46 +0000 Subject: [PATCH] don't leak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12721 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_lcr/mod_lcr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mod/applications/mod_lcr/mod_lcr.c b/src/mod/applications/mod_lcr/mod_lcr.c index 5fd63237c9..db1c5807f0 100644 --- a/src/mod/applications/mod_lcr/mod_lcr.c +++ b/src/mod/applications/mod_lcr/mod_lcr.c @@ -563,6 +563,8 @@ switch_status_t lcr_do_lookup(callback_t *cb_struct, char *digits) /* format the custom_sql */ safe_sql = format_custom_sql(profile->custom_sql, cb_struct, digits_copy); if (!safe_sql) { + switch_event_safe_destroy(&cb_struct->event); + switch_core_hash_destroy(&cb_struct->dedup_hash); return SWITCH_STATUS_GENERR; } SWITCH_STANDARD_STREAM(sql_stream); @@ -577,6 +579,7 @@ switch_status_t lcr_do_lookup(callback_t *cb_struct, char *digits) lookup_status = lcr_execute_sql_callback((char *)sql_stream.data, route_add_callback, cb_struct); switch_safe_free(sql_stream.data); + switch_event_safe_destroy(&cb_struct->event); switch_core_hash_destroy(&cb_struct->dedup_hash); if (lookup_status) {