[ofa-general] [PATCH] Fixed memory leak in drivers/net/mlx4/main.c

Nicolas Morey-Chaisemartin nicolas.morey-chaisemartin at ext.bull.net
Mon Apr 20 23:05:11 PDT 2009


When msi_x is enabled but not enough vectors are available, the vector array was not freed.

Signed-off-by: Nicolas Morey-Chaisemartin <nicolas.morey-chaisemartin at ext.bull.net>
---
Written on HEAD of ofed_1_5/linux-2.6.git
  drivers/net/mlx4/main.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index 102bac9..30bea96 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -976,7 +976,7 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev)
  				nreq = err;
  				goto retry;
  			}
-
+			kfree(entries);
  			goto no_msi;
  		}
  
-- 
1.6.2.GIT




More information about the general mailing list