From 6a8ab6827eff17f48bea20c811441c93cea264d4 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 21 Jul 2016 17:20:38 +0200 Subject: socket: reset IPv4 socket to NULL after free Signed-off-by: Jason A. Donenfeld --- src/socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/socket.c b/src/socket.c index e52218e..9dd1683 100644 --- a/src/socket.c +++ b/src/socket.c @@ -466,6 +466,7 @@ int socket_init(struct wireguard_device *wg) if (ret < 0) { pr_err("Could not create IPv6 socket\n"); udp_tunnel_sock_release(new4); + rcu_assign_pointer(wg->sock4, NULL); goto out; } -- cgit v1.2.3