From: Arne Schwabe Date: Wed, 12 Sep 2018 11:07:01 +0000 (+0200) Subject: Properly free tuntap struct on android when emulating persist-tun X-Git-Tag: v2.5_beta1~441 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da3f583f30a4b2be9cc5501874373fc4f627158d;p=thirdparty%2Fopenvpn.git Properly free tuntap struct on android when emulating persist-tun Trac-Ticket: #851 Acked-by: Gert Doering Message-Id: <20180912110701.31609-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17460.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 2933d5558..b1f4320aa 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -1680,6 +1680,9 @@ do_open_tun(struct context *c) if (c->c1.tuntap) { oldtunfd = c->c1.tuntap->fd; + free(c->c1.tuntap); + c->c1.tuntap = NULL; + c->c1.tuntap_owned = false; } #endif