aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/setconf.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-12-02 19:19:38 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-12-05 11:48:25 +0100
commiteed7ef0d84c09954291c1c88d08315646cf5c347 (patch)
tree56e461c04cb0d5bedc10a38bca95729e6f26f54e /src/tools/setconf.c
parentsend: avoid touching skb->{next,prev} directly (diff)
downloadwireguard-monolithic-historical-eed7ef0d84c09954291c1c88d08315646cf5c347.tar.xz
wireguard-monolithic-historical-eed7ef0d84c09954291c1c88d08315646cf5c347.zip
ipc: make sure userspace communication frees wgdevice
Diffstat (limited to '')
-rw-r--r--src/tools/setconf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/setconf.c b/src/tools/setconf.c
index a244c07..f778f40 100644
--- a/src/tools/setconf.c
+++ b/src/tools/setconf.c
@@ -45,8 +45,10 @@ static bool sync_conf(struct wgdevice *file)
return false;
}
- if (!runtime->first_peer)
+ if (!runtime->first_peer) {
+ free_wgdevice(runtime);
return true;
+ }
file->flags &= ~WGDEVICE_REPLACE_PEERS;