FS-9310 Part two. Properly destroy the timeout struct after the message has sent, or timed out.

This commit is contained in:
William King 2016-07-07 15:35:24 -07:00
parent e5f46faea2
commit 5d39170ccd
1 changed files with 2 additions and 0 deletions

View File

@ -418,6 +418,7 @@ switch_status_t mod_sms_flowroute_profile_send_message(mod_sms_flowroute_profile
goto err;
}
h2o_timeout_dispose(msg->ctx.loop, msg->ctx.io_timeout);
switch_mutex_destroy(msg->mutex);
switch_safe_free(msg->req.base);
switch_safe_free(msg);
@ -427,6 +428,7 @@ switch_status_t mod_sms_flowroute_profile_send_message(mod_sms_flowroute_profile
if ( msg && msg->mutex ) {
switch_mutex_destroy(msg->mutex);
}
h2o_timeout_dispose(msg->ctx.loop, msg->ctx.io_timeout);
switch_safe_free(msg->req.base);
switch_safe_free(msg);
return SWITCH_STATUS_GENERR;