Patch "um: vector: Fix memory leak in vector_config" has been added to the 5.15-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.15-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.15 subdirectory.

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



commit a02a4682225216949ae04c8102e09b2817a8c5df
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 cde6db184c26b..45a4bcd27a39b 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -770,6 +770,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