_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
This commit is contained in:
pfg 2015-04-22 16:51:21 +00:00
parent 7807fcddc4
commit 90a59d1e9b

View File

@ -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;