Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6958e827 authored by Jack Morgenstein's avatar Jack Morgenstein Committed by Roland Dreier
Browse files

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: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 19891915
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca)

out_free_mr:
	ib_dereg_mr(priv->mr);
	ipoib_cm_dev_cleanup(dev);

out_free_pd:
	ib_dealloc_pd(priv->pd);