diff options
Diffstat (limited to 'lib/libkse/thread/thr_exit.c')
-rw-r--r-- | lib/libkse/thread/thr_exit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libkse/thread/thr_exit.c b/lib/libkse/thread/thr_exit.c index c989443..795decc 100644 --- a/lib/libkse/thread/thr_exit.c +++ b/lib/libkse/thread/thr_exit.c @@ -134,6 +134,12 @@ pthread_exit(void *status) _thread_cleanupspecific(); } + /* Free thread-specific poll_data structure, if allocated */ + if (_thread_run->poll_data.fds != NULL) { + free(_thread_run->poll_data.fds); + _thread_run->poll_data.fds = NULL; + } + /* * Defer signals to protect the scheduling queues from access * by the signal handler: |