1
0
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:
Dmitrij Tejblum 1999-08-30 15:45:42 +00:00
parent df6cb0046a
commit ffd73a0043
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50660
3 changed files with 18 additions and 0 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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: