diff options
author | David S. Miller <davem@davemloft.net> | 2020-04-29 14:23:05 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-29 14:23:05 -0700 |
commit | fa0531990450ff121875f3c36a11372bf74562bf (patch) | |
tree | 4c73cd80a3c146626ecfbfe769119efd9f3519fa /drivers/net/wireguard/queueing.c | |
parent | b67bd6847a9659bc02db01b82b2b79841fbbc159 (diff) | |
parent | e8c72696cd7e7bc6abd0be69ce2abea476685e37 (diff) | |
download | wireguard-linux-trimmed-fa0531990450ff121875f3c36a11372bf74562bf.tar.gz wireguard-linux-trimmed-fa0531990450ff121875f3c36a11372bf74562bf.zip |
Merge branch 'wireguard-fixes'
Jason A. Donenfeld says:
====================
wireguard fixes for 5.7-rc4
This series contains two fixes and a cleanup for wireguard:
1) Removal of a spurious newline, from Sultan Alsawaf.
2) Fix for a memory leak in an error path, in which memory allocated
prior to the error wasn't freed, reported by Sultan Alsawaf.
3) Fix to ECN support to use RFC6040 properly like all the other tunnel
drivers, from Toke Høiland-Jørgensen.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireguard/queueing.c')
-rw-r--r-- | drivers/net/wireguard/queueing.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireguard/queueing.c b/drivers/net/wireguard/queueing.c index 5c964fc..71b8e80 100644 --- a/drivers/net/wireguard/queueing.c +++ b/drivers/net/wireguard/queueing.c @@ -35,8 +35,10 @@ int wg_packet_queue_init(struct crypt_queue *queue, work_func_t function, if (multicore) { queue->worker = wg_packet_percpu_multicore_worker_alloc( function, queue); - if (!queue->worker) + if (!queue->worker) { + ptr_ring_cleanup(&queue->ring, NULL); return -ENOMEM; + } } else { INIT_WORK(&queue->work, function); } |