]> git.baikalelectronics.ru Git - kernel.git/commit
um: vector: Fix memory leak in vector_config
authorXiang Yang <xiangyang3@huawei.com>
Tue, 15 Nov 2022 07:32:25 +0000 (15:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:44:08 +0000 (16:44 +0100)
commit5f9296d43b64da724277873f1eb21d2cb88dd8ad
treefee7e470192aaf4634e4476efef1e2d7c71c3e7d
parent74a188e3f4f2a1167558d12e0d5c7be7a00feab0
um: vector: Fix memory leak in vector_config

[ Upstream commit 8f88c73afe481f93d40801596927e8c0047b6d96 ]

If the return value of the uml_parse_vector_ifspec function is NULL,
we should call kfree(params) to prevent memory leak.

Fixes: 6922d31f3415 ("High Performance UML Vector Network Driver")
Signed-off-by: Xiang Yang <xiangyang3@huawei.com>
Acked-By: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/um/drivers/vector_kern.c