aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-08-29 16:17:36 +0200
committerSverker Eriksson <[email protected]>2012-08-29 16:17:36 +0200
commit46820dc1ce466d383e464cb5ffb8cec676039f8b (patch)
tree5d292863d971211dc7aabec8680a0dc3cd6dbbe3 /erts/emulator/beam
parentbb1747c07f559f0563f37b4606cbfc5a1612db08 (diff)
parent6d71b902d0ae8eb85b59af4905c234f05228cf97 (diff)
downloadotp-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.c7
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 */