summaryrefslogtreecommitdiffstats
path: root/lib/cpumask.c
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2023-09-03 15:10:28 +0800
committerShuah Khan <skhan@linuxfoundation.org>2023-09-05 12:30:06 -0600
commit9076bc476d7ebf0565903c4b048442131825c1c3 (patch)
treea7406d60f0f2ed73b1b47fa47187271383ec2e62 /lib/cpumask.c
parent2b56a4b79b7b3086e842d39611db4e19b19dbe2a (diff)
downloadlinux-stable-9076bc476d7ebf0565903c4b048442131825c1c3.tar.gz
linux-stable-9076bc476d7ebf0565903c4b048442131825c1c3.tar.bz2
linux-stable-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 <ruanjinjie@huawei.com> Suggested-by: Rae Moar <rmoar@google.com> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/cpumask.c')
0 files changed, 0 insertions, 0 deletions