]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: double free error and freeing uninitialized null pointer
authorSebin Sebastian <mailmesebin00@gmail.com>
Sat, 30 Jul 2022 03:46:58 +0000 (09:16 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Aug 2022 19:41:23 +0000 (15:41 -0400)
commit028a0a98eceaacae799a1aaa7739fa8448071934
tree92a551b7b0db05bc1633a751d73ccde8a3597570
parent1899c696162e8c4d287095fc893273726bdd00da
drm/amdgpu: double free error and freeing uninitialized null pointer

Fix a double free and an uninitialized pointer read error. Both tmp and
new are pointing at same address and both are freed which leads to
double free. Adding a check to verify if new and tmp are free in the
error_free label fixes the double free issue. new is not initialized to
null which also leads to a free on an uninitialized pointer.

Reviewed-by: André Almeida <andrealmeid@igalia.com>
Suggested by: S. Amaranath <Amaranath.Somalapuram@amd.com>
Signed-off-by: Sebin Sebastian <mailmesebin00@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c