kunit/fortify: Fix mismatched kvalloc()/vfree() usage
authorKees Cook <keescook@chromium.org>
Thu, 25 Apr 2024 23:06:22 +0000 (16:06 -0700)
committerKees Cook <keescook@chromium.org>
Fri, 26 Apr 2024 22:31:39 +0000 (15:31 -0700)
commit998b18072ceb0613629c256b409f4d299829c7ec
tree0e89a066132d5259a35c9bf929f2845fc4beef73
parentc3408c4ae041dcc6a302397099fcad0dc307f6fd
kunit/fortify: Fix mismatched kvalloc()/vfree() usage

The kv*() family of tests were accidentally freeing with vfree() instead
of kvfree(). Use kvfree() instead.

Fixes: 9124a2640148 ("kunit/fortify: Validate __alloc_size attribute results")
Link: https://lore.kernel.org/r/20240425230619.work.299-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
lib/fortify_kunit.c