diff options
| author | Jesper Juhl <[email protected]> | 2010-12-26 21:14:01 +0000 |
|---|---|---|
| committer | James Bottomley <[email protected]> | 2011-01-24 17:42:10 +0000 |
| commit | efee0bd9b272b0dae1c7fb1bb0be75606c8fa6f8 (patch) | |
| tree | e7c31143eb82b218d34cb2fb254e3d7c914ac569 /drivers/message/fusion/mptctl.c | |
| parent | [SCSI] bnx2i: Added reconnect fix connecting against Lefthand targets (diff) | |
| download | kernel-efee0bd9b272b0dae1c7fb1bb0be75606c8fa6f8.tar.gz kernel-efee0bd9b272b0dae1c7fb1bb0be75606c8fa6f8.zip | |
[SCSI] mptfusion: Fix memory leak in mptctl_getiocinfo()
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 <[email protected]>
Acked-by: "Desai, Kashyap" <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
Diffstat (limited to 'drivers/message/fusion/mptctl.c')
| -rw-r--r-- | drivers/message/fusion/mptctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index a3856ed90aef..1dcc13a52c7e 100644 --- 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; |
