diff options
author | alex <alex@FreeBSD.org> | 1997-05-13 23:54:22 +0000 |
---|---|---|
committer | alex <alex@FreeBSD.org> | 1997-05-13 23:54:22 +0000 |
commit | 045a1cc0a4dd1c96f52e16bc54fe53f9c8b0fe3f (patch) | |
tree | 7f58c643ca75de6cb95bd589d29fec055e64d81e | |
parent | ff44d156748805f022175c2d4a4dc93f58eb7576 (diff) | |
download | FreeBSD-src-045a1cc0a4dd1c96f52e16bc54fe53f9c8b0fe3f.zip FreeBSD-src-045a1cc0a4dd1c96f52e16bc54fe53f9c8b0fe3f.tar.gz |
Fixed overallocation of _thread_fd_table.
PR: 3494
Submitted by: Steve Bauer <sbauer@rock.sdsmt.edu>
-rw-r--r-- | lib/libc_r/uthread/uthread_init.c | 2 | ||||
-rw-r--r-- | lib/libkse/thread/thr_init.c | 2 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_init.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc_r/uthread/uthread_init.c b/lib/libc_r/uthread/uthread_init.c index 2adc34f..5833cdf 100644 --- a/lib/libc_r/uthread/uthread_init.c +++ b/lib/libc_r/uthread/uthread_init.c @@ -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. diff --git a/lib/libkse/thread/thr_init.c b/lib/libkse/thread/thr_init.c index 2adc34f..5833cdf 100644 --- a/lib/libkse/thread/thr_init.c +++ b/lib/libkse/thread/thr_init.c @@ -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. diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c index 2adc34f..5833cdf 100644 --- a/lib/libpthread/thread/thr_init.c +++ b/lib/libpthread/thread/thr_init.c @@ -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. |