diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-07-21 17:20:38 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-07-21 17:20:38 +0200 |
commit | 6a8ab6827eff17f48bea20c811441c93cea264d4 (patch) | |
tree | 0375e2f31f109c2dd07a8f7b55f9ffc057109a2c | |
parent | 29a29f13435bb7dd8be04c4c3138ce2b76a082e9 (diff) |
socket: reset IPv4 socket to NULL after free
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/socket.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |