Changeset 5689 for pjproject


Ignore:
Timestamp:
Nov 10, 2017 3:16:30 AM (21 months ago)
Author:
ming
Message:

Fixed #2060: Prevent releasing unacquired lock when creating SIP dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_dialog.c

    r5608 r5689  
    330330    pj_ssize_t len; 
    331331    pjsip_dialog *dlg; 
     332    pj_bool_t lock_incremented = PJ_FALSE; 
    332333 
    333334    /* Check arguments. */ 
     
    512513     * destroyed prematurely (such as in case of transport error). 
    513514     */ 
    514     if (inc_lock) 
     515    if (inc_lock) { 
    515516        pjsip_dlg_inc_lock(dlg); 
     517        lock_incremented = PJ_TRUE; 
     518    } 
    516519 
    517520    /* Create UAS transaction for this request. */ 
     
    557560    } 
    558561 
    559     if (inc_lock) { 
     562    if (lock_incremented) { 
    560563        pjsip_dlg_dec_lock(dlg); 
    561564    } else { 
Note: See TracChangeset for help on using the changeset viewer.