diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2020-05-23 17:20:30 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2020-06-04 18:56:37 +0200 |
commit | 2e24d457d8c97e409549848715ff046cfa9efd3d (patch) | |
tree | 67eeb1d422b8e81d31cf9ac6a1418d12239ed0b8 /libgomp | |
parent | dc9541545d9e5705a97c41713c557f55522b54dc (diff) | |
download | gcc-2e24d457d8c97e409549848715ff046cfa9efd3d.zip gcc-2e24d457d8c97e409549848715ff046cfa9efd3d.tar.gz gcc-2e24d457d8c97e409549848715ff046cfa9efd3d.tar.bz2 |
[OpenACC] Missing unlocking on error paths in attach/detach code, part II
libgomp/
* oacc-mem.c (goacc_exit_data_internal): Unlock on error path.
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/oacc-mem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libgomp/oacc-mem.c b/libgomp/oacc-mem.c index c06b734..6713846 100644 --- a/libgomp/oacc-mem.c +++ b/libgomp/oacc-mem.c @@ -1060,7 +1060,10 @@ goacc_exit_data_internal (struct gomp_device_descr *acc_dev, size_t mapnum, = splay_tree_lookup (&acc_dev->mem_map, &cur_node); if (n == NULL) - gomp_fatal ("struct not mapped for detach operation"); + { + gomp_mutex_unlock (&acc_dev->lock); + gomp_fatal ("struct not mapped for detach operation"); + } gomp_detach_pointer (acc_dev, aq, n, hostaddr, finalize, NULL); } |