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

    usb: qcserial add missing errorpath kfrees

to the 2.6.38-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:
     usb-qcserial-add-missing-errorpath-kfrees.patch
and it can be found in the queue-2.6.38 subdirectory.

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


>From cb62d65f966146a39fdde548cb474dacf1d00fa5 Mon Sep 17 00:00:00 2001
From: Steven Hardy <[email protected]>
Date: Mon, 4 Apr 2011 18:02:25 +0100
Subject: usb: qcserial add missing errorpath kfrees

From: Steven Hardy <[email protected]>

commit cb62d65f966146a39fdde548cb474dacf1d00fa5 upstream.

There are two -ENODEV error paths in qcprobe where the allocated private
data is not freed, this patch adds the two missing kfrees to avoid
leaking memory on the error path

Signed-off-by: Steven Hardy <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/serial/qcserial.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -167,6 +167,7 @@ static int qcprobe(struct usb_serial *se
                                        "Could not set interface, error %d\n",
                                        retval);
                                retval = -ENODEV;
+                               kfree(data);
                        }
                } else if (ifnum == 2) {
                        dbg("Modem port found");
@@ -191,6 +192,7 @@ static int qcprobe(struct usb_serial *se
                                        "Could not set interface, error %d\n",
                                        retval);
                                retval = -ENODEV;
+                               kfree(data);
                        }
                }
                break;


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

queue-2.6.38/usb-qcserial-avoid-pointing-to-freed-memory.patch
queue-2.6.38/usb-fix-qcserial-memory-leak-on-rmmod.patch
queue-2.6.38/usb-qcserial-add-missing-errorpath-kfrees.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to