diff mbox

[gomp-4.1] fix incorrect memory size in goacc_new_thread

Message ID 55DF2900.8020705@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Aug. 27, 2015, 3:13 p.m. UTC
On 08/25/2015 10:44 AM, Aldy Hernandez wrote:
> This is either blatantly wrong or subtly correct, in which case it needs
> a comment.  My guess is the former.
>
> OK for branch?

Hi Thomas.

Jakub has pre-approved this patch.  I would like to commit it to trunk. 
  Do you object?  Would you like to test it further?

Thanks.
commit badfb67c72f72e468c1e100711fa5e925a831ed6
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Aug 25 10:32:48 2015 -0700

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

Patch

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;