mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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
3 changed files with 3 additions and 3 deletions
|
|
@ -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 a new issue