diff options
author | jasone <jasone@FreeBSD.org> | 2007-11-28 00:16:24 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2007-11-28 00:16:24 +0000 |
commit | 600513aa8d26e2661e657d0e1e26eb6cbc9c85e8 (patch) | |
tree | bb5fd2cec7b86859a0de3c64cf67b19e6ca6df92 /lib/libkse | |
parent | 8ee51043418b2b11413644c7a7057901d8c70caf (diff) | |
download | FreeBSD-src-600513aa8d26e2661e657d0e1e26eb6cbc9c85e8.zip FreeBSD-src-600513aa8d26e2661e657d0e1e26eb6cbc9c85e8.tar.gz |
Fix pointer dereferencing problems in _pthread_mutex_init_calloc_cb() that
were obscured by pseudo-opaque pthreads API pointer casting.
Diffstat (limited to 'lib/libkse')
-rw-r--r-- | lib/libkse/thread/thr_mutex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libkse/thread/thr_mutex.c b/lib/libkse/thread/thr_mutex.c index d8bf498..3a3546b 100644 --- a/lib/libkse/thread/thr_mutex.c +++ b/lib/libkse/thread/thr_mutex.c @@ -254,8 +254,9 @@ _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, .m_ceiling = 0, .m_flags = 0 }; + static const struct pthread_mutex_attr *pattr = &attr; - return (thr_mutex_init(mutex, (pthread_mutexattr_t *)&attr, + return (thr_mutex_init(mutex, (pthread_mutexattr_t *)&pattr, calloc_cb)); } |