diff options
| author | Nicolas Morey-Chaisemartin <nicolas.morey-chaisemartin@ext.bull.net> | 2009-04-21 13:11:06 -0400 |
|---|---|---|
| committer | Roland Dreier <rolandd@cisco.com> | 2009-04-21 13:11:06 -0400 |
| commit | 5bf0da7dd0ae193e072412519cba1d77b6196c61 (patch) | |
| tree | 6d995cda8a563dacfd734cb1fb2395e83c08559f | |
| parent | a939b96cccdb65df80a52447ec8e4a6d79c56dbb (diff) | |
mlx4_core: Fix memory leak in mlx4_enable_msi_x()
When the msi_x option is enabled but pci_enable_msix() fails (not
enough vectors are available etc), the entries array was not freed on
the error path.
Signed-off-by: Nicolas Morey-Chaisemartin <nicolas.morey-chaisemartin@ext.bull.net>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
| -rw-r--r-- | 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 102bac90a302..30bea9689694 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) | |||
| 976 | nreq = err; | 976 | nreq = err; |
| 977 | goto retry; | 977 | goto retry; |
| 978 | } | 978 | } |
| 979 | 979 | kfree(entries); | |
| 980 | goto no_msi; | 980 | goto no_msi; |
| 981 | } | 981 | } |
| 982 | 982 | ||
