projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70e1472
)
[SCSI] mptfusion: Fix memory leak in mptctl_getiocinfo()
author
Jesper Juhl
<jj@chaosbits.net>
Sun, 26 Dec 2010 21:14:01 +0000
(22:14 +0100)
committer
James Bottomley
<James.Bottomley@suse.de>
Mon, 24 Jan 2011 17:42:10 +0000
(11:42 -0600)
A 'kfree(karg)' is missing in a failure path in
mptctl.c::mptctl_getiocinfo() which can cause a memory leak.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: "Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/message/fusion/mptctl.c
patch
|
blob
|
history
diff --git
a/drivers/message/fusion/mptctl.c
b/drivers/message/fusion/mptctl.c
index
a3856ed
..
1dcc13a
100644
(file)
--- a/
drivers/message/fusion/mptctl.c
+++ b/
drivers/message/fusion/mptctl.c
@@
-1307,8
+1307,10
@@
mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
else
karg->adapterType = MPT_IOCTL_INTERFACE_SCSI;
- if (karg->hdr.port > 1)
+ if (karg->hdr.port > 1) {
+ kfree(karg);
return -EINVAL;
+ }
port = karg->hdr.port;
karg->port = port;