Browse Source

[PATCH] IPoIB: fix memory leak

Fix IPoIB memory leak on device removal.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Michael S. Tsirkin 20 years ago
parent
commit
06c56e44f3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/infiniband/ulp/ipoib/ipoib_main.c

+ 2 - 0
drivers/infiniband/ulp/ipoib/ipoib_main.c

@@ -1062,6 +1062,8 @@ static void ipoib_remove_one(struct ib_device *device)
 		ipoib_dev_cleanup(priv->dev);
 		free_netdev(priv->dev);
 	}
+
+	kfree(dev_list);
 }
 
 static int __init ipoib_init_module(void)