提交 70b4c8cd 编写于 作者: E Eli Cohen 提交者: Roland Dreier

IPoIB: Fix error path in ipoib_mcast_dev_flush()

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: NEli Cohen <eli@mellanox.co.il>
Signed-off-by: NMichael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 cf311cd4
......@@ -780,9 +780,11 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
&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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册