mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
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
df6cb0046a
commit
ffd73a0043
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50660
@ -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