Fix memory leak, unused variable pointed out by the compiler

This commit is contained in:
jca 2019-02-21 23:41:12 +00:00
parent ebda678ea6
commit c35744bdca
2 changed files with 13 additions and 2 deletions

View File

@ -1,8 +1,10 @@
# $OpenBSD: Makefile,v 1.93 2019/02/21 23:32:23 jca Exp $
# $OpenBSD: Makefile,v 1.94 2019/02/21 23:41:12 jca Exp $
COMMENT= easy-to-use, robust, and highly configurable VPN
DISTNAME= openvpn-2.4.7
REVISION= 0
CATEGORIES= net security
HOMEPAGE= https://openvpn.net/index.php/open-source/

View File

@ -1,6 +1,7 @@
$OpenBSD: patch-src_openvpn_tun_c,v 1.16 2018/03/04 19:03:00 jca Exp $
$OpenBSD: patch-src_openvpn_tun_c,v 1.17 2019/02/21 23:41:12 jca Exp $
- no need for link0 any more, we have separate tap interfaces
- fix memory leak (gc is unused)
Index: src/openvpn/tun.c
--- src/openvpn/tun.c.orig
@ -38,3 +39,11 @@ Index: src/openvpn/tun.c
IFCONFIG_PATH,
actual,
ifconfig_local,
@@ -2615,7 +2620,6 @@ close_tun(struct tuntap *tt)
}
else if (tt)
{
- struct gc_arena gc = gc_new();
struct argv argv = argv_new();
/* setup command, close tun dev (clears tt->actual_name!), run command