Don't leak memory on allocation failure for broadcast mcast group.
Also, print a warning to match handling for other mcast groups.
Signed-off-by: Eli Cohen <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
---
drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
70b4c8cdc168bb5d18e23fd205c4ede1b756a8b2
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index ed0c2ea..6c6db75 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -780,9 +780,11 @@ void ipoib_mcast_dev_flush(struct net_de
&priv->multicast_tree);
list_add_tail(&priv->broadcast->list, &remove_list);
- }
-
- priv->broadcast = nmcast;
+ priv->broadcast = nmcast;
+ } else
+ ipoib_warn(priv, "could not reallocate broadcast group "
+ IPOIB_GID_FMT "\n",
+ IPOIB_GID_ARG(priv->broadcast->mcmember.mgid));
}
spin_unlock_irqrestore(&priv->lock, flags);
--
1.0.7
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]