projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29021bc
)
pti: ENXIO error case memory leak PTI fix.
author
J Freyensee
<james_p_freyensee@linux.intel.com>
Wed, 25 May 2011 21:45:40 +0000
(14:45 -0700)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 7 Jun 2011 17:01:19 +0000
(10:01 -0700)
This patch fixes a memory leak that can occur in the error case
ENXIO is returned in the pti_tty_install() routine.
Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/misc/pti.c
patch
|
blob
|
history
diff --git
a/drivers/misc/pti.c
b/drivers/misc/pti.c
index be4857358d911dc5540e3e66d2fb2d899bb77477..e74e7d266569c21b7c5c630af9a051f9e7e3a7cc 100644
(file)
--- a/
drivers/misc/pti.c
+++ b/
drivers/misc/pti.c
@@
-476,8
+476,10
@@
static int pti_tty_install(struct tty_driver *driver, struct tty_struct *tty)
else
pti_tty_data->mc = pti_request_masterchannel(2);
- if (pti_tty_data->mc == NULL)
+ if (pti_tty_data->mc == NULL) {
+ kfree(pti_tty_data);
return -ENXIO;
+ }
tty->driver_data = pti_tty_data;
}