Skip to content

Commit

Permalink
qrouting: Fix missing lock_release() on error case
Browse files Browse the repository at this point in the history
Credits to @ryancaicse for the report in #2714

(cherry picked from commit f0ab96e)
  • Loading branch information
liviuchircu committed Dec 20, 2021
1 parent 0b8bf0e commit 290c3e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/qrouting/qr_acc.c
Expand Up @@ -237,10 +237,8 @@ void qr_check_reply_tmcb(struct cell *cell, int type, struct tmcb_params *ps)
trans_prop->state |= QR_TM_180_RCVD;
lock_release(trans_prop->prop_lock);

if ((pdd_tm = get_elapsed_time(&trans_prop->invite, 'm')) < 0) {
lock_release(trans_prop->prop_lock);
if ((pdd_tm = get_elapsed_time(&trans_prop->invite, 'm')) < 0)
return;
}

qr_add_pdd(trans_prop->gw, pdd_tm);
} else {
Expand Down

0 comments on commit 290c3e6

Please sign in to comment.