[ofa-general] [PATCH] ipoib: fix error flow memory leak

Jack Morgenstein jackm at dev.mellanox.co.il
Mon Aug 6 07:09:09 PDT 2007


Leak in ipoib_transport_dev_init -- need to clean up ipoib_cm_dev.

Found by Dotan Barak of Mellanox
Signed-off-by: Jack Morgenstein <jackm at dev.mellanox.co.il>

Index: infiniband/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
===================================================================
--- infiniband.orig/drivers/infiniband/ulp/ipoib/ipoib_verbs.c	2007-07-19 13:18:06.830269000 +0300
+++ infiniband/drivers/infiniband/ulp/ipoib/ipoib_verbs.c	2007-08-06 17:01:33.265187000 +0300
@@ -211,6 +211,7 @@ out_free_cq:
 
 out_free_mr:
 	ib_dereg_mr(priv->mr);
+	ipoib_cm_dev_cleanup(dev);
 
 out_free_pd:
 	ib_dealloc_pd(priv->pd);



More information about the general mailing list