diff options
author | Tushar Pankaj <tushar.s.pankaj@gmail.com> | 2018-11-12 22:42:54 -0600 |
---|---|---|
committer | Tushar Pankaj <tushar.s.pankaj@gmail.com> | 2018-11-12 22:42:54 -0600 |
commit | 76923fc4c44a7454c80dfd220c42812af92eca41 (patch) | |
tree | de850bbbe418b2351fa7994b609e91b2094d1dd1 | |
parent | Implement basic server/client + protocol (diff) | |
download | wg-dynamic-76923fc4c44a7454c80dfd220c42812af92eca41.tar.xz wg-dynamic-76923fc4c44a7454c80dfd220c42812af92eca41.zip |
Fix memleaktp/experiment
Signed-off-by: Tushar Pankaj <tushar.s.pankaj@gmail.com>
-rw-r--r-- | server.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |