mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-16 20:02:47 +00:00
don't leak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12721 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f5d97f2fb3
commit
8c1dee5ac9
@ -563,6 +563,8 @@ switch_status_t lcr_do_lookup(callback_t *cb_struct, char *digits)
|
|||||||
/* format the custom_sql */
|
/* format the custom_sql */
|
||||||
safe_sql = format_custom_sql(profile->custom_sql, cb_struct, digits_copy);
|
safe_sql = format_custom_sql(profile->custom_sql, cb_struct, digits_copy);
|
||||||
if (!safe_sql) {
|
if (!safe_sql) {
|
||||||
|
switch_event_safe_destroy(&cb_struct->event);
|
||||||
|
switch_core_hash_destroy(&cb_struct->dedup_hash);
|
||||||
return SWITCH_STATUS_GENERR;
|
return SWITCH_STATUS_GENERR;
|
||||||
}
|
}
|
||||||
SWITCH_STANDARD_STREAM(sql_stream);
|
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);
|
lookup_status = lcr_execute_sql_callback((char *)sql_stream.data, route_add_callback, cb_struct);
|
||||||
|
|
||||||
switch_safe_free(sql_stream.data);
|
switch_safe_free(sql_stream.data);
|
||||||
|
switch_event_safe_destroy(&cb_struct->event);
|
||||||
switch_core_hash_destroy(&cb_struct->dedup_hash);
|
switch_core_hash_destroy(&cb_struct->dedup_hash);
|
||||||
|
|
||||||
if (lookup_status) {
|
if (lookup_status) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user