diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-11-29 04:42:15 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-12-05 11:48:25 +0100 |
commit | 3be7e2f42612c69bdc59e7f633d43a2f3f293978 (patch) | |
tree | b51b0ce08d38077cc03e790bdc71c9ab1d59fe74 /src | |
parent | cc563d36968322be1ae88b84c2dd339ae5fdcbbc (diff) |
send: use kfree_skb_list
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/send.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -236,13 +236,6 @@ void wg_packet_send_keepalive(struct wg_peer *peer) #define skb_walk_null_queue_safe(first, skb, next) \ for (skb = first, next = skb->next; skb; \ skb = next, next = skb ? skb->next : NULL) -static void skb_free_null_queue(struct sk_buff *first) -{ - struct sk_buff *skb, *next; - - skb_walk_null_queue_safe(first, skb, next) - dev_kfree_skb(skb); -} static void wg_packet_create_data_done(struct sk_buff *first, struct wg_peer *peer) @@ -284,7 +277,7 @@ void wg_packet_tx_worker(struct work_struct *work) if (likely(state == PACKET_STATE_CRYPTED)) wg_packet_create_data_done(first, peer); else - skb_free_null_queue(first); + kfree_skb_list(first); wg_noise_keypair_put(keypair, false); wg_peer_put(peer); @@ -343,7 +336,7 @@ err: return; wg_noise_keypair_put(PACKET_CB(first)->keypair, false); wg_peer_put(peer); - skb_free_null_queue(first); + kfree_skb_list(first); } void wg_packet_purge_staged_packets(struct wg_peer *peer) |