This functions would definitely benefit from a refactoring towards
"early return"... nest too deep for no good (and so the error path
is less than clear... the "success -> return pi/ii" is deeply nested,
and then why have a "return pi/ii" at all on failure?).

Your patch has been applied to the master and release/2.7 branch
("bugfix, do not access uninitialized structure pointers").

commit 6649526a4da30e3234ec3386133c50b9c5e83a17 (master)
commit acac32d12e1ed3456d731b7c69459e2b6ea22c11 (release/2.7)
Author: Razvan Cojocaru
Date:   Wed Nov 4 13:48:37 2026 +0100

     tun: return NULL when the second adapter info query fails

     Signed-off-by: Razvan Cojocaru <[email protected]>
     Acked-by: Frank Lichtenheld <[email protected]>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2127
     Message-Id: <[email protected]>
     URL: 
https://lore.kernel.org/openvpn-devel/[email protected]
     Signed-off-by: Gert Doering <[email protected]>


--
kind regards,

Gert Doering



_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to