aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-09-24 14:11:54 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-09-24 14:11:54 +0200
commitc1fe179d5d5dab87f19f6dd1326c4a631e666a3d (patch)
tree473f6aa9808a212264083449e80216104f4600a4
parentb6468b585d06446a9aec139c66af35568b356484 (diff)
AMPS: Fix 'use-after-free-bug' after destroying transaction
-rw-r--r--src/amps/amps.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/amps/amps.c b/src/amps/amps.c
index 74abbc4..61786b5 100644
--- a/src/amps/amps.c
+++ b/src/amps/amps.c
@@ -699,11 +699,9 @@ void amps_rx_signaling_tone(amps_t *amps, int tone, double quality)
if (!tone)
break;
timer_stop(&trans->timer);
- destroy_transaction(trans);
- if (trans->callref) {
+ if (trans->callref)
call_in_release(trans->callref, CAUSE_NORMAL);
- trans->callref = 0;
- }
+ destroy_transaction(trans);
amps_go_idle(amps);
break;
case TRANS_CALL_MT_ALERT: