[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 <jj@chaosbits.net>
Acked-by: "Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
Jesper Juhl 2010-12-26 22:14:01 +01:00 коммит произвёл James Bottomley
Родитель 70e1472271
Коммит efee0bd9b2
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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;