summaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_sysfs_unit.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2007-08-10 14:50:51 -0700
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:47:13 -0400
commit568761955ad01c6d238d8b12d21a554c1226a37b (patch)
treef855ccc4944cf2646709db63452af6c35bbedc0c /drivers/s390/scsi/zfcp_sysfs_unit.c
parentd7383a234626b58dc6bc210ed806a6911c1f44e1 (diff)
[SCSI] mpt fusion: fix two potential mem leaks
The Coverity checker spotted two potential memory leaks in drivers/message/fusion/mptbase.c::mpt_attach(). There are two returns that may leak the storage allocated for 'ioc' (sizeof(MPT_ADAPTER) bytes). A simple fix would be to simply add two kfree() calls before the return statements, but a better fix (that this patch implements) is to reorder the code so that if we hit the first return condition we don't have to do the allocation at all and then just add a kfree() call for the second case. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: "Moore, Eric Dean" <Eric.Moore@lsil.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_sysfs_unit.c')
0 files changed, 0 insertions, 0 deletions