summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/cleanuppop.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/cleanuppop.c')
-rw-r--r--cpukit/posix/src/cleanuppop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/posix/src/cleanuppop.c b/cpukit/posix/src/cleanuppop.c
index f9706bd408..f477d1f0c8 100644
--- a/cpukit/posix/src/cleanuppop.c
+++ b/cpukit/posix/src/cleanuppop.c
@@ -40,7 +40,8 @@ void pthread_cleanup_pop(
return;
_ISR_Disable( level );
- handler = (POSIX_Cancel_Handler_control *) _Chain_Tail( handler_stack );
+ handler = (POSIX_Cancel_Handler_control *)
+ _Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );