summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-04-22 16:51:21 +0000
committerpfg <pfg@FreeBSD.org>2015-04-22 16:51:21 +0000
commit90a59d1e9ba29619094ff1837babfb2bd29e5614 (patch)
treefeeedc9c28c273828005bd84f4e7278f21c2fa31
parent7807fcddc423b01b6c0d930ba53d7c0c95f4e9b2 (diff)
downloadFreeBSD-src-90a59d1e9ba29619094ff1837babfb2bd29e5614.zip
FreeBSD-src-90a59d1e9ba29619094ff1837babfb2bd29e5614.tar.gz
_pthread_cleanup_push: fix allocator sizeof operand mismatch
Same fix appears to be in DragonFly's libthread_xu. Found by: Clang Static Analyzer MFC after: 1 week
-rw-r--r--lib/libthr/thread/thr_clean.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_clean.c b/lib/libthr/thread/thr_clean.c
index dc5b0c7..f200726 100644
--- a/lib/libthr/thread/thr_clean.c
+++ b/lib/libthr/thread/thr_clean.c
@@ -84,7 +84,7 @@ _pthread_cleanup_push(void (*routine) (void *), void *arg)
curthread->unwind_disabled = 1;
#endif
if ((newbuf = (struct pthread_cleanup *)
- malloc(sizeof(struct _pthread_cleanup_info))) != NULL) {
+ malloc(sizeof(struct pthread_cleanup))) != NULL) {
newbuf->routine = routine;
newbuf->routine_arg = arg;
newbuf->onheap = 1;
OpenPOWER on IntegriCloud