diff options
| author | Jesper Juhl <[email protected]> | 2007-08-10 14:50:51 -0700 |
|---|---|---|
| committer | James Bottomley <[email protected]> | 2007-10-12 14:47:13 -0400 |
| commit | 568761955ad01c6d238d8b12d21a554c1226a37b (patch) | |
| tree | f855ccc4944cf2646709db63452af6c35bbedc0c /tools/perf/scripts/python | |
| parent | d7383a234626b58dc6bc210ed806a6911c1f44e1 (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 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions