svn commit: r282225 - stable/9/lib/libthr/thread

Pedro F. Giffuni pfg at FreeBSD.org
Wed Apr 29 15:33:56 UTC 2015


Author: pfg
Date: Wed Apr 29 15:33:55 2015
New Revision: 282225
URL: https://svnweb.freebsd.org/changeset/base/282225

Log:
  MFC	r281857:
  _pthread_cleanup_push: fix allocator sizeof operand mismatch
  
  Same fix appears to be in DragonFly's libthread_xu.
  
  Found by:	Clang Static Analyzer

Modified:
  stable/9/lib/libthr/thread/thr_clean.c
Directory Properties:
  stable/9/lib/libthr/   (props changed)

Modified: stable/9/lib/libthr/thread/thr_clean.c
==============================================================================
--- stable/9/lib/libthr/thread/thr_clean.c	Wed Apr 29 15:33:07 2015	(r282224)
+++ stable/9/lib/libthr/thread/thr_clean.c	Wed Apr 29 15:33:55 2015	(r282225)
@@ -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;


More information about the svn-src-stable-9 mailing list