Commit c1f2d9b9 authored by Jan Vesely's avatar Jan Vesely
Browse files

amdgpu: Destroy fd_hash table when the last device is removed.

Fixes memory leak on module unload.
Analogous to mesa commit of the same name.
Signed-off-by: Jan Vesely's avatarJan Vesely <>
Reviewed-by: Michel Dänzer's avatarMichel Dänzer <>
Reviewed-by: default avatarAlex Deucher <>
parent 52ef6fba
......@@ -128,6 +128,10 @@ static void amdgpu_device_free_internal(amdgpu_device_handle dev)
util_hash_table_remove(fd_tab, UINT_TO_PTR(dev->fd));
if (util_hash_table_count(fd_tab) == 0) {
fd_tab = NULL;
if ((dev->flink_fd >= 0) && (dev->fd != dev->flink_fd))
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