projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10ca442
)
USB: qcserial: fix a memory leak in qcprobe error path
author
Axel Lin
<axel.lin@gmail.com>
Mon, 21 Jun 2010 00:44:17 +0000
(08:44 +0800)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 30 Jun 2010 15:16:06 +0000
(08:16 -0700)
This patch adds missing kfree(data) before return -ENODEV.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/qcserial.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/serial/qcserial.c
b/drivers/usb/serial/qcserial.c
index 04bb759536bb81f6e41ecc2b4537e5e2e0b2790f..93d72eb8cafc8deaa36a52e2632a6cee3429ce66 100644
(file)
--- a/
drivers/usb/serial/qcserial.c
+++ b/
drivers/usb/serial/qcserial.c
@@
-139,6
+139,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);
}
return retval;
}
@@
-155,6
+156,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);
}
return retval;
}
@@
-163,6
+165,7
@@
static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
default:
dev_err(&serial->dev->dev,
"unknown number of interfaces: %d\n", nintf);
+ kfree(data);
return -ENODEV;
}