Commit 52022880 by Thomas Schwinge

[OpenACC] Missing unlocking on error paths in attach/detach code, part II

	libgomp/
	* oacc-mem.c (goacc_exit_data_internal): Unlock on error path.

(cherry picked from commit 2e24d457d8c97e409549848715ff046cfa9efd3d)
parent 16faaf52
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment