Skip to contentSkip to conversation

Patch "can: gs_usb: fix memory leak in gs_cmd_reset()" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jun 18, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

can: gs_usb: fix memory leak in gs_cmd_reset()

to the 4.9-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:
can-gs_usb-fix-memory-leak-in-gs_cmd_reset.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 5cda3ee5138e91ac369ed9d0b55eab0dab077686 Mon Sep 17 00:00:00 2001

From: Marc Kleine-Budde <[email protected]>
Date: Sun, 4 Jun 2017 14:03:42 +0200
Subject: can: gs_usb: fix memory leak in gs_cmd_reset()

From: Marc Kleine-Budde <[email protected]>

commit 5cda3ee5138e91ac369ed9d0b55eab0dab077686 upstream.

This patch adds the missing kfree() in gs_cmd_reset() to free the memory that is not used anymore after usb_control_msg().

---
 drivers/net/can/usb/gs_usb.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/net/can/usb/gs_usb.c +2 -0
@@ -265,6 +265,8 @@ static int gs_cmd_reset(struct gs_usb *g
 			     sizeof(*dm),
 			     1000);
 
+	kfree(dm);
+
 	return rc;
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/can-gs_usb-fix-memory-leak-in-gs_cmd_reset.patch