]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amdkfd: Fix resource leak in criu restore queue
authorJesse Zhang <jesse.zhang@amd.com>
Fri, 6 Sep 2024 03:29:55 +0000 (11:29 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Sep 2024 17:44:06 +0000 (13:44 -0400)
To avoid memory leaks, release q_extra_data when exiting the restore queue.
v2: Correct the proto (Alex)

Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
Reviewed-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

index 20ea745729ee3c5431232f128987c2479f162816..b439d4d0bd84a5ff041f085bff18e37e1e34a26e 100644 (file)
@@ -1046,6 +1046,7 @@ exit:
                pr_debug("Queue id %d was restored successfully\n", queue_id);
 
        kfree(q_data);
+       kfree(q_extra_data);
 
        return ret;
 }