Changeset 4314


Ignore:
Timestamp:
Jan 11, 2013 4:10:08 AM (12 years ago)
Author:
nanang
Message:

Fix #1604: crash caused by double destructions in ICE stream transport.

File:
1 edited

Legend:

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

    r4205 r4314  
    742742    PJ_ASSERT_RETURN(ice_st, PJ_EINVAL); 
    743743 
     744    sess_add_ref(ice_st); 
    744745    ice_st->destroy_req = PJ_TRUE; 
    745     if (pj_atomic_get(ice_st->busy_cnt) > 0) { 
     746    if (sess_dec_ref(ice_st)) { 
    746747        PJ_LOG(5,(ice_st->obj_name,  
    747748                  "ICE strans object is busy, will destroy later")); 
    748749        return PJ_EPENDING; 
    749750    } 
    750      
    751     destroy_ice_st(ice_st); 
     751 
    752752    return PJ_SUCCESS; 
    753753} 
     
    771771    pj_assert(count >= 0); 
    772772    if (count==0 && ice_st->destroy_req) { 
    773         pj_ice_strans_destroy(ice_st); 
     773        destroy_ice_st(ice_st); 
    774774        return PJ_FALSE; 
    775775    } else { 
Note: See TracChangeset for help on using the changeset viewer.