Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 2015 15:33:08 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r282224 - stable/10/lib/libthr/thread
Message-ID:  <201504291533.t3TFX8k3068145@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Wed Apr 29 15:33:07 2015
New Revision: 282224
URL: https://svnweb.freebsd.org/changeset/base/282224

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/10/lib/libthr/thread/thr_clean.c
Directory Properties:
  stable/10/   (props changed)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504291533.t3TFX8k3068145>