Patch "um: vector: Fix memory leak in vector_config" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    um: vector: Fix memory leak in vector_config

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     um-vector-fix-memory-leak-in-vector_config.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 730308f19abb04e4bbca2c522811d75e0dd4f1c7
Author: Xiang Yang <xiangyang3@xxxxxxxxxx>
Date:   Tue Nov 15 15:32:25 2022 +0800

    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: 49da7e64f33e ("High Performance UML Vector Network Driver")
    Signed-off-by: Xiang Yang <xiangyang3@xxxxxxxxxx>
    Acked-By: Anton Ivanov <anton.ivanov@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Richard Weinberger <richard@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 555203e3e7b45..fc662f7cc2afb 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -771,6 +771,7 @@ static int vector_config(char *str, char **error_out)
 
 	if (parsed == NULL) {
 		*error_out = "vector_config failed to parse parameters";
+		kfree(params);
 		return -EINVAL;
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux