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

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



commit a9d334cc792fff2e344e9b2843b041279d549706
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 50ee3bb5a63a9..b0b124025b486 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -741,6 +741,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