diff options
author | Sverker Eriksson <[email protected]> | 2012-03-30 16:31:26 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-03-30 16:31:26 +0200 |
commit | aa257fbe5248a054e3c3b660efe6013d9e52bc70 (patch) | |
tree | f5dd602a06c74705686d6305e723c9a26765ef84 /erts/emulator/beam | |
parent | 7c052e0dcff8eada390264fa340a88125eedab4e (diff) | |
parent | 73e6d0f2b775e9ff8d65ccdb2dfbef2cb211e91a (diff) | |
download | otp-aa257fbe5248a054e3c3b660efe6013d9e52bc70.tar.gz otp-aa257fbe5248a054e3c3b660efe6013d9e52bc70.tar.bz2 otp-aa257fbe5248a054e3c3b660efe6013d9e52bc70.zip |
Merge branch 'sverk/proc-race-leak/OTP-10041' into maint
* sverk/proc-race-leak/OTP-10041:
erts: Fix memory leak caused by race on exiting process
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_process_lock.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process_lock.h b/erts/emulator/beam/erl_process_lock.h index 97e554914e..8dbdaccc68 100644 --- a/erts/emulator/beam/erl_process_lock.h +++ b/erts/emulator/beam/erl_process_lock.h @@ -958,8 +958,6 @@ erts_pid2proc_opt(Process *c_p, if (flags & ERTS_P2P_FLG_TRY_LOCK) proc = ERTS_PROC_LOCK_BUSY; else { - if (flags & ERTS_P2P_FLG_SMP_INC_REFC) - proc->lock.refc++; #ifdef ERTS_ENABLE_LOCK_COUNT erts_lcnt_proc_lock_unaquire(&proc->lock, lcnt_locks); #endif @@ -969,6 +967,8 @@ erts_pid2proc_opt(Process *c_p, pid_need_locks, pix_lock, flags); + if (proc && (flags & ERTS_P2P_FLG_SMP_INC_REFC)) + proc->lock.refc++; } } } |