Changeset 5233 for pjproject/trunk


Ignore:
Timestamp:
Jan 5, 2016 2:34:22 PM (9 years ago)
Author:
riza
Message:

Re #1903: Fix crash when cleaning STUN response cache.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/stun_session.c

    r4983 r5233  
    210210{ 
    211211    pj_stun_tx_data *tdata; 
     212    pj_stun_session *sess; 
    212213 
    213214    PJ_UNUSED_ARG(timer_heap); 
     
    215216    entry->id = PJ_FALSE; 
    216217    tdata = (pj_stun_tx_data*) entry->user_data; 
     218    sess = tdata->sess; 
     219 
     220    pj_grp_lock_acquire(sess->grp_lock); 
     221    if (sess->is_destroying) { 
     222        pj_grp_lock_release(sess->grp_lock); 
     223        return; 
     224    } 
    217225 
    218226    PJ_LOG(5,(SNAME(tdata->sess), "Response cache deleted")); 
    219227 
    220228    pj_list_erase(tdata); 
     229    pj_grp_lock_release(sess->grp_lock); 
     230 
    221231    destroy_tdata(tdata, PJ_FALSE); 
    222232} 
Note: See TracChangeset for help on using the changeset viewer.