Fixed #2025: crash in pjsua_destroy if there's pending outgoing TCP/TLS transmission

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5613 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Sauw Ming 2017-07-04 00:13:24 +00:00
parent 576a3c0ae9
commit ae6a52677a
1 changed files with 6 additions and 2 deletions

View File

@ -1848,8 +1848,12 @@ static void send_msg_callback( pjsip_send_state *send_state,
{
*cont = PJ_FALSE;
/* Decrease pending send counter */
pj_grp_lock_dec_ref(tsx->grp_lock);
/* Decrease pending send counter, but only if the transaction layer
* hasn't been shutdown.
*/
if (mod_tsx_layer.mod.id >= 0)
pj_grp_lock_dec_ref(tsx->grp_lock);
return;
}