diff options
| author | Jinjie Ruan <[email protected]> | 2023-09-03 07:10:28 +0000 |
|---|---|---|
| committer | Shuah Khan <[email protected]> | 2023-09-05 18:30:06 +0000 |
| commit | 9076bc476d7ebf0565903c4b048442131825c1c3 (patch) | |
| tree | a7406d60f0f2ed73b1b47fa47187271383ec2e62 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
| parent | kunit: Fix possible null-ptr-deref in kunit_parse_glob_filter() (diff) | |
| download | kernel-9076bc476d7ebf0565903c4b048442131825c1c3.tar.gz kernel-9076bc476d7ebf0565903c4b048442131825c1c3.zip | |
kunit: Fix possible memory leak in kunit_filter_suites()
If both filter_glob and filters are not NULL, and kunit_parse_glob_filter()
succeed, but kcalloc parsed_filters fails, the suite_glob and test_glob of
parsed kzalloc in kunit_parse_glob_filter() will be leaked.
As Rae suggested, assign -ENOMEM to *err to correctly free copy and goto
free_parsed_glob to free the suite/test_glob of parsed.
Fixes: 1c9fd080dffe ("kunit: fix uninitialized variables bug in attributes filtering")
Signed-off-by: Jinjie Ruan <[email protected]>
Suggested-by: Rae Moar <[email protected]>
Reviewed-by: David Gow <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions
