diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-12-11 16:46:31 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@gnu.org> | 2008-12-11 16:46:31 +0100 |
commit | 335bbeaccabaecdc07e92dae91c8d9284e708c90 (patch) | |
tree | 327ec4a86f31e1bf1a0aea789ed4f9116e0e82ce /libpthread/pthread | |
parent | 8560dd4d462e064c8050000d909d431ff0853b7b (diff) |
Use calloc, not malloc, to allocate a new struct __pthread.
2008-12-11 Neal H. Walfield <neal@gnu.org>
* pthread/pt-alloc.c (__pthread_alloc): Use calloc, not malloc, to
allocate a new struct __pthread.
Diffstat (limited to 'libpthread/pthread')
-rw-r--r-- | libpthread/pthread/pt-alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpthread/pthread/pt-alloc.c b/libpthread/pthread/pt-alloc.c index 6af2da9..c63801f 100644 --- a/libpthread/pthread/pt-alloc.c +++ b/libpthread/pthread/pt-alloc.c @@ -123,7 +123,7 @@ __pthread_alloc (struct __pthread **pthread) } /* Allocate a new thread structure. */ - new = malloc (sizeof (struct __pthread)); + new = calloc (sizeof (struct __pthread), 1); if (new == NULL) return ENOMEM; |