Message ID | 20221215190143.2107896-7-arne@rfc2549.org |
---|---|
State | Accepted |
Headers | show |
Series | Improvement/fixes based on Trail of Bits audit | expand |
Acked-by: Gert Doering <gert@greenie.muc.de> Trivial enough. Client-side tested to see if the compiler agrees :-) (it does, but in release/2.5, *one* of these GCs is actually still used - 2.5 still has PF, and PF log calls mroute_addr_print_ex(..., &gc)... so the backport only removes the other gc) Your patch has been applied to the master, release/2.6 and release/2.5 branch. commit 97929d16a4eb05cb521a469ff4eaca32761699f3 (master) commit a873736483836a3c0574085712beeaea8bba30e9 (release/2.6) commit 5ca01c79bc3c972719e844b224dac981e128cbb6 (release/2.5) Author: Arne Schwabe Date: Thu Dec 15 20:01:41 2022 +0100 Remove unused gc_arena Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Gert Doering <gert@greenie.muc.de> 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 <gert@greenie.muc.de> -- kind regards, Gert Doering
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; }
Reported-By: Trail of Bits Signed-off-by: Arne Schwabe <arne@rfc2549.org> --- src/openvpn/forward.c | 3 --- src/openvpn/multi.c | 2 -- 2 files changed, 5 deletions(-)