From: Arne Schwabe Date: Thu, 15 Dec 2022 19:01:41 +0000 (+0100) Subject: Remove unused gc_arena X-Git-Tag: v2.6_rc1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a873736483836a3c0574085712beeaea8bba30e9;p=thirdparty%2Fopenvpn.git Remove unused gc_arena Reported-By: Trail of Bits Signed-off-by: Arne Schwabe Acked-by: Gert Doering Message-Id: <20221215190143.2107896-7-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25736.html Signed-off-by: Gert Doering (cherry picked from commit 97929d16a4eb05cb521a469ff4eaca32761699f3) --- diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index 7924fd5c6..c04511ee1 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1869,8 +1869,6 @@ process_outgoing_link(struct context *c) void process_outgoing_tun(struct context *c) { - struct gc_arena gc = gc_new(); - /* * Set up for write() call to TUN/TAP * device. @@ -1956,7 +1954,6 @@ process_outgoing_tun(struct context *c) buf_reset(&c->c2.to_tun); perf_pop(); - gc_free(&gc); } void diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 870e3fa61..fcb308151 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3497,7 +3497,6 @@ multi_process_incoming_link(struct multi_context *m, struct multi_instance *inst bool multi_process_incoming_tun(struct multi_context *m, const unsigned int mpp_flags) { - struct gc_arena gc = gc_new(); bool ret = true; if (BLEN(&m->top.c2.buf) > 0) @@ -3583,7 +3582,6 @@ multi_process_incoming_tun(struct multi_context *m, const unsigned int mpp_flags } } } - gc_free(&gc); return ret; }