Skip to content

Commit

Permalink
mlx4_core: Fix memory leak in mlx4_enable_msi_x()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Morey-Chaisemartin authored and Roland Dreier committed Apr 21, 2009
1 parent a939b96 commit 5bf0da7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev)
nreq = err;
goto retry;
}

kfree(entries);
goto no_msi;
}

Expand Down

0 comments on commit 5bf0da7

Please sign in to comment.