瀏覽代碼

IPoIB: Fix leak in ipoib_transport_dev_init() error path

ipoib_transport_dev_init() calls ipoib_cm_dev_init(), so it needs to
call ipoib_cm_dev_cleanup() to unwind that on the error path.

Found by Dotan Barak of Mellanox.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Jack Morgenstein 18 年之前
父節點
當前提交
6958e827f1
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/infiniband/ulp/ipoib/ipoib_verbs.c

+ 1 - 0
drivers/infiniband/ulp/ipoib/ipoib_verbs.c

@@ -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);