Skip to content

Commit

Permalink
IPoIB: Fix leak in ipoib_transport_dev_init() error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jack Morgenstein authored and Roland Dreier committed Aug 7, 2007
1 parent 1989191 commit 6958e82
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/ulp/ipoib/ipoib_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6958e82

Please sign in to comment.