From eed7ef0d84c09954291c1c88d08315646cf5c347 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 2 Dec 2019 19:19:38 +0100 Subject: ipc: make sure userspace communication frees wgdevice --- src/tools/setconf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tools/setconf.c') 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; -- cgit v1.2.3-59-g8ed1b