[gomp-4.1] fix incorrect memory size in goacc_new_thread
diff mbox

Message ID 55DCA96E.10805@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Aug. 25, 2015, 5:44 p.m. UTC
This is either blatantly wrong or subtly correct, in which case it needs 
a comment.  My guess is the former.

OK for branch?
commit 330391636113ed9a9067e6eb639755fb0f4723dc
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Aug 25 10:41:28 2015 -0700

    	* oacc-init.c (goacc_new_thread): Use correct size of goacc_thread
    	when allocating memory.

Patch
diff mbox

diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c
index c91731e..e6d2c03 100644
--- a/libgomp/oacc-init.c
+++ b/libgomp/oacc-init.c
@@ -312,7 +312,7 @@  acc_shutdown_1 (acc_device_t d)
 static struct goacc_thread *
 goacc_new_thread (void)
 {
-  struct goacc_thread *thr = gomp_malloc (sizeof (struct gomp_thread));
+  struct goacc_thread *thr = gomp_malloc (sizeof (struct goacc_thread));
 
 #if defined HAVE_TLS || defined USE_EMUTLS
   goacc_tls_data = thr;