aboutsummaryrefslogtreecommitdiffstats
path: root/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'server.c')
-rw-r--r--server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/server.c b/server.c
index 318dc60..7f2dce9 100644
--- a/server.c
+++ b/server.c
@@ -18,7 +18,9 @@
bool is_wg_up_on_iface(const char iface[])
{
wg_device *device;
- if (wg_get_device(&device, iface) < 0) {
+ int ret = wg_get_device(&device, iface);
+ wg_free_device(device);
+ if (ret < 0) {
return false;
} else {
return true;