Commit 9044854e authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Simon Wunderlich

batman-adv: Simplify 'batadv_v_ogm_aggr_list_free()'

Use 'skb_queue_purge()' instead of re-implementing it.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
parent 79f0a485
...@@ -178,13 +178,9 @@ static bool batadv_v_ogm_queue_left(struct sk_buff *skb, ...@@ -178,13 +178,9 @@ static bool batadv_v_ogm_queue_left(struct sk_buff *skb,
*/ */
static void batadv_v_ogm_aggr_list_free(struct batadv_hard_iface *hard_iface) static void batadv_v_ogm_aggr_list_free(struct batadv_hard_iface *hard_iface)
{ {
struct sk_buff *skb;
lockdep_assert_held(&hard_iface->bat_v.aggr_list_lock); lockdep_assert_held(&hard_iface->bat_v.aggr_list_lock);
while ((skb = skb_dequeue(&hard_iface->bat_v.aggr_list))) skb_queue_purge(&hard_iface->bat_v.aggr_list);
kfree_skb(skb);
hard_iface->bat_v.aggr_len = 0; hard_iface->bat_v.aggr_len = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment