diff options
author | Steven Hardy <shardy@redhat.com> | 2011-04-04 18:02:25 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-13 15:53:16 -0700 |
commit | cb62d65f966146a39fdde548cb474dacf1d00fa5 (patch) | |
tree | 52ad1605b719a2891ba3ed49066cc6e11c589142 /drivers/usb/serial | |
parent | 99ab3f9e4eaec35fd2d7159c31b71f17f7e613e3 (diff) | |
download | blackbird-op-linux-cb62d65f966146a39fdde548cb474dacf1d00fa5.tar.gz blackbird-op-linux-cb62d65f966146a39fdde548cb474dacf1d00fa5.zip |
usb: qcserial add missing errorpath kfrees
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 <shardy@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/qcserial.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index cd638648479a..54a9dab1f33b 100644 --- a/drivers/usb/serial/qcserial.c +++ b/drivers/usb/serial/qcserial.c @@ -167,6 +167,7 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) "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 *serial, const struct usb_device_id *id) "Could not set interface, error %d\n", retval); retval = -ENODEV; + kfree(data); } } break; |