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: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
Eli Cohen 2006-01-10 07:42:14 -08:00 коммит произвёл Roland Dreier
Родитель cf311cd49a
Коммит 70b4c8cdc1
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -780,9 +780,11 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
&priv->multicast_tree); &priv->multicast_tree);
list_add_tail(&priv->broadcast->list, &remove_list); list_add_tail(&priv->broadcast->list, &remove_list);
} priv->broadcast = nmcast;
} else
priv->broadcast = nmcast; 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); spin_unlock_irqrestore(&priv->lock, flags);