[ofa-general] [PATCH 1/1] SDP - Fix a memory leak in bzcopy
Jim Mott
jim at mellanox.com
Mon Nov 19 06:27:51 PST 2007
The Mellanox regression group found and fixed a problem that could cause
memory
leaks in the bzcopy code.
Signed-off-by: Jim Mott <jim at mellanox.com>
---
Index: ofa_1_3_dev_kernel/drivers/infiniband/ulp/sdp/sdp_main.c
===================================================================
--- ofa_1_3_dev_kernel.orig/drivers/infiniband/ulp/sdp/sdp_main.c
2007-11-19 08:56:45.000000000 -0600
+++ ofa_1_3_dev_kernel/drivers/infiniband/ulp/sdp/sdp_main.c
2007-11-19 09:19:24.000000000 -0600
@@ -1248,8 +1248,10 @@
* fits into the frags array in the skb.
*/
size_goal = size_goal / PAGE_SIZE + 1;
- if (size_goal >= MAX_SKB_FRAGS)
+ if (size_goal >= MAX_SKB_FRAGS) {
+ kfree(bz);
return NULL;
+ }
addr = (unsigned long)base;
More information about the general
mailing list