From faa55d8b19a269c2a1c5ada3098dfb775ba17419 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 Signed-off-by: Jason A. Donenfeld --- src/setconf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/setconf.c') 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; -- cgit v1.2.3-59-g8ed1b