Skip to content

Commit 8f88c73

Browse files
Xiang Yangrichardweinberger
authored andcommitted
um: vector: Fix memory leak in vector_config
If the return value of the uml_parse_vector_ifspec function is NULL, we should call kfree(params) to prevent memory leak. Fixes: 49da7e6 ("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>
1 parent 3271e27 commit 8f88c73

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/um/drivers/vector_kern.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,7 @@ static int vector_config(char *str, char **error_out)
767767

768768
if (parsed == NULL) {
769769
*error_out = "vector_config failed to parse parameters";
770+
kfree(params);
770771
return -EINVAL;
771772
}
772773

0 commit comments

Comments
 (0)