diff options
Diffstat (limited to 'src/linux')
-rw-r--r-- | src/linux/tun.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/linux/tun.c b/src/linux/tun.c index 005f125..c886335 100644 --- a/src/linux/tun.c +++ b/src/linux/tun.c @@ -116,6 +116,15 @@ void tun_close(tun_device_t** dev) if((*dev)->fd_ > 0) close((*dev)->fd_); + if((*dev)->actual_name_) + free((*dev)->actual_name_); + + if((*dev)->local_) + free((*dev)->local_); + + if((*dev)->remote_netmask_) + free((*dev)->remote_netmask_); + free(*dev); *dev = NULL; } @@ -188,4 +197,6 @@ void tun_do_ifconfig(tun_device_t* dev) log_printf(ERR, "Execution of ifconfig failed"); else log_printf(NOTICE, "ifconfig returned %d", WEXITSTATUS(result)); + + free(command); } |