diff options
author | Sverker Eriksson <[email protected]> | 2012-08-29 16:17:36 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-08-29 16:17:36 +0200 |
commit | 46820dc1ce466d383e464cb5ffb8cec676039f8b (patch) | |
tree | 5d292863d971211dc7aabec8680a0dc3cd6dbbe3 /erts/emulator/beam | |
parent | bb1747c07f559f0563f37b4606cbfc5a1612db08 (diff) | |
parent | 6d71b902d0ae8eb85b59af4905c234f05228cf97 (diff) | |
download | otp-46820dc1ce466d383e464cb5ffb8cec676039f8b.tar.gz otp-46820dc1ce466d383e464cb5ffb8cec676039f8b.tar.bz2 otp-46820dc1ce466d383e464cb5ffb8cec676039f8b.zip |
Merge branch 'sverk/port-data-lock-bug' into maint
* sverk/port-data-lock-bug:
Fix premature deallocation bug of port data lock
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_async.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_async.c b/erts/emulator/beam/erl_async.c index cb975d64b0..f308039baf 100644 --- a/erts/emulator/beam/erl_async.c +++ b/erts/emulator/beam/erl_async.c @@ -394,6 +394,8 @@ static ERTS_INLINE void call_async_ready(ErtsAsync *a) } erts_port_release(p); } + if (a->pdl) + driver_pdl_dec_refc(a->pdl); if (a->hndl) erts_ddll_dereference_driver(a->hndl); } @@ -403,9 +405,6 @@ static ERTS_INLINE void async_reply(ErtsAsync *a, ErtsThrQPrepEnQ_t *prep_enq) #if ERTS_USE_ASYNC_READY_Q ErtsAsyncReadyQ *arq; - if (a->pdl) - driver_pdl_dec_refc(a->pdl); - #if ERTS_ASYNC_PRINT_JOB erts_fprintf(stderr, "=>> %ld\n", a->async_id); #endif @@ -425,8 +424,6 @@ static ERTS_INLINE void async_reply(ErtsAsync *a, ErtsThrQPrepEnQ_t *prep_enq) #else /* ERTS_USE_ASYNC_READY_Q */ call_async_ready(a); - if (a->pdl) - driver_pdl_dec_refc(a->pdl); erts_free(ERTS_ALC_T_ASYNC, (void *) a); #endif /* ERTS_USE_ASYNC_READY_Q */ |