From: Arne Schwabe Date: Wed, 25 Sep 2024 15:11:04 +0000 (+0200) Subject: Remove null check after checking for checking for did_open_tun X-Git-Tag: v2.7_alpha1~185 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8cc97f94f3e7bb52270ca2acf89804093535839;p=thirdparty%2Fopenvpn.git Remove null check after checking for checking for did_open_tun If we indicate that the tun device has been opened the c1.tuntap struct is guaranteed to be defined. This extra null check is something that Coverity flags as we access a do a null check after already accessing fields of tuntap Change-Id: I9966636163c7dfa208d26f1cadbf5b81937f3a34 Signed-off-by: Arne Schwabe Acked-by: Gert Doering Message-Id: <20240925151104.13036-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29447.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 876edad7..ae911a9f 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -2546,10 +2546,7 @@ do_up(struct context *c, bool pulled_options, unsigned int option_types_found) { event_timeout_init(&c->c2.route_wakeup, c->options.route_delay, now); event_timeout_init(&c->c2.route_wakeup_expire, c->options.route_delay + c->options.route_delay_window, now); - if (c->c1.tuntap) - { - tun_standby_init(c->c1.tuntap); - } + tun_standby_init(c->c1.tuntap); } else {