Fix a memory leak: free the thread-specific poll_data, used in the select()
implementation. PR: 13368 Submitted by: Steve Bernacki, Jr. <steve@copacetic.net>
This commit is contained in:
parent
7b6ca448b1
commit
0c0843ee5c
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user