Author: pfg
Date: Wed Apr 22 16:51:21 2015
New Revision: 281857
URL: https://svnweb.freebsd.org/changeset/base/281857

Log:
  _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

Modified:
  head/lib/libthr/thread/thr_clean.c

Modified: head/lib/libthr/thread/thr_clean.c
==============================================================================
--- head/lib/libthr/thread/thr_clean.c  Wed Apr 22 16:06:49 2015        
(r281856)
+++ head/lib/libthr/thread/thr_clean.c  Wed Apr 22 16:51:21 2015        
(r281857)
@@ -84,7 +84,7 @@ _pthread_cleanup_push(void (*routine) (v
        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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to