]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
mlx4_core: Fix memory leak in mlx4_enable_msi_x()
authorNicolas Morey-Chaisemartin <nicolas.morey-chaisemartin@ext.bull.net>
Tue, 21 Apr 2009 17:11:06 +0000 (10:11 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 21 Apr 2009 17:11:06 +0000 (10:11 -0700)
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>
drivers/net/mlx4/main.c

index 102bac90a302fcdecccead75e03e3c5ade175b55..30bea968969426659671cedca5e1562e0584c057 100644 (file)
@@ -976,7 +976,7 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev)
                                nreq = err;
                                goto retry;
                        }
-
+                       kfree(entries);
                        goto no_msi;
                }