aboutsummaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorJesper Juhl <[email protected]>2007-08-10 14:50:51 -0700
committerJames Bottomley <[email protected]>2007-10-12 14:47:13 -0400
commit568761955ad01c6d238d8b12d21a554c1226a37b (patch)
treef855ccc4944cf2646709db63452af6c35bbedc0c /include/linux/timerqueue.h
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 <[email protected]> Acked-by: "Moore, Eric Dean" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: James Bottomley <[email protected]>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions