aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-12-17 11:35:06 +0100
committerRickard Green <[email protected]>2010-12-17 11:35:06 +0100
commit264f3beaa4eec74244c6ed66d31e48ae5025df51 (patch)
tree14dff80ee6b65500a0dac42465026daff1cd215a /erts/emulator/beam
parent99e34bba1a60b262e24496cc9288b549360c6377 (diff)
downloadotp-264f3beaa4eec74244c6ed66d31e48ae5025df51.tar.gz
otp-264f3beaa4eec74244c6ed66d31e48ae5025df51.tar.bz2
otp-264f3beaa4eec74244c6ed66d31e48ae5025df51.zip
Decrement refc after unlock in exit/2
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/bif.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 6e9755ad48..864e7c1178 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -1351,9 +1351,10 @@ BIF_RETTYPE exit_2(BIF_ALIST_2)
#ifdef ERTS_SMP
if (rp == BIF_P)
rp_locks &= ~ERTS_PROC_LOCK_MAIN;
- else
+ if (rp_locks)
+ erts_smp_proc_unlock(rp, rp_locks);
+ if (rp != BIF_P)
erts_smp_proc_dec_refc(rp);
- erts_smp_proc_unlock(rp, rp_locks);
#endif
/*
* We may have exited ourselves and may have to take action.