lib/test: use after free in register_test_dev_kmod()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Mar 2022 05:52:07 +0000 (08:52 +0300)
committerLuis Chamberlain <mcgrof@kernel.org>
Tue, 29 Mar 2022 22:13:36 +0000 (15:13 -0700)
commitdc0ce6cc4b133f5f2beb8b47dacae13a7d283c2c
tree7024d31e752882c83c16d1460cd7942d5e513c44
parent13776ebb9964b2ea66ffb8c824c0762eed6da784
lib/test: use after free in register_test_dev_kmod()

The "test_dev" pointer is freed but then returned to the caller.

Fixes: d9c6a72d6fa2 ("kmod: add test driver to stress test the module loader")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
lib/test_kmod.c