mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 13:32:45 +00:00
Fixed overallocation of _thread_fd_table.
PR: 3494 Submitted by: Steve Bauer <sbauer@rock.sdsmt.edu>
This commit is contained in:
parent
8d9b7b9e3f
commit
9c49eac672
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=25795
@ -183,7 +183,7 @@ _thread_init(void)
|
||||
PANIC("Cannot get dtablesize");
|
||||
}
|
||||
/* Allocate memory for the file descriptor table: */
|
||||
if ((_thread_fd_table = (struct fd_table_entry **) malloc(sizeof(struct fd_table_entry) * _thread_dtablesize)) == NULL) {
|
||||
if ((_thread_fd_table = (struct fd_table_entry **) malloc(sizeof(struct fd_table_entry *) * _thread_dtablesize)) == NULL) {
|
||||
/*
|
||||
* Cannot allocate memory for the file descriptor
|
||||
* table, so abort this process.
|
||||
|
@ -183,7 +183,7 @@ _thread_init(void)
|
||||
PANIC("Cannot get dtablesize");
|
||||
}
|
||||
/* Allocate memory for the file descriptor table: */
|
||||
if ((_thread_fd_table = (struct fd_table_entry **) malloc(sizeof(struct fd_table_entry) * _thread_dtablesize)) == NULL) {
|
||||
if ((_thread_fd_table = (struct fd_table_entry **) malloc(sizeof(struct fd_table_entry *) * _thread_dtablesize)) == NULL) {
|
||||
/*
|
||||
* Cannot allocate memory for the file descriptor
|
||||
* table, so abort this process.
|
||||
|
@ -183,7 +183,7 @@ _thread_init(void)
|
||||
PANIC("Cannot get dtablesize");
|
||||
}
|
||||
/* Allocate memory for the file descriptor table: */
|
||||
if ((_thread_fd_table = (struct fd_table_entry **) malloc(sizeof(struct fd_table_entry) * _thread_dtablesize)) == NULL) {
|
||||
if ((_thread_fd_table = (struct fd_table_entry **) malloc(sizeof(struct fd_table_entry *) * _thread_dtablesize)) == NULL) {
|
||||
/*
|
||||
* Cannot allocate memory for the file descriptor
|
||||
* table, so abort this process.
|
||||
|
Loading…
Reference in New Issue
Block a user