aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/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
commitfaa55d8b19a269c2a1c5ada3098dfb775ba17419 (patch)
tree575fcfca7763c46194d832d21c7fe0cdd22ca5e2 /src/setconf.c
parentwg-quick: linux: have remove_iptables return true (diff)
downloadwireguard-tools-faa55d8b19a269c2a1c5ada3098dfb775ba17419.tar.xz
wireguard-tools-faa55d8b19a269c2a1c5ada3098dfb775ba17419.zip
ipc: make sure userspace communication frees wgdevice
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--src/setconf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/setconf.c b/src/setconf.c
index a244c07..f778f40 100644
--- a/src/setconf.c
+++ b/src/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;