Skip to content

Commit

Permalink
src/datawizard/interfaces/data_interface.c: fix memory leak
Browse files Browse the repository at this point in the history
closes #57
  • Loading branch information
nfurmento committed Sep 23, 2024
1 parent 12231e7 commit 607fbd4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/datawizard/interfaces/data_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,13 @@ static void _starpu_data_unregister(starpu_data_handle_t handle, unsigned cohere
a = _starpu_unregister_hook_func_list_next(a))
a->hook_func(handle);

while (!_starpu_unregister_hook_func_list_empty(&handle->unregister_hook))
{
/* This computation is complete */
a = _starpu_unregister_hook_func_list_pop_front(&handle->unregister_hook);
_starpu_unregister_hook_func_delete(a);
}

/* Wait for finished requests to release the handle */
_starpu_spin_lock(&handle->header_lock);
if (handle->busy_count)
Expand Down

0 comments on commit 607fbd4

Please sign in to comment.