init_route() can allocate memory in netlist, but fail in many more ways
than just fail to allocate. Thus, always check and clean up netlist if
needed, instead of just when init_route() succeeds.
This fix is for release/2.3 only. The master branch uses a gc to clean
up the netlist, and needs a di
init_route() can allocate memory in netlist, but fail in many more ways
than just fail to allocate. Thus, always check and clean up netlist if
needed, instead of just when init_route() succeeds.
This fix is for master only. The release/2.3 branch cleans up netlist
immediately, and needs a differ
Also prevents false positives in static analysis tools.
(Note that the current x_msg() code does properly exit, this is just a way
to make it trivial to see we will not return from msg() on fatal errors,
even for static analysis tools.)
Signed-off-by: Steffan Karger
---
src/openvpn/error.h | 11
Signed-off-by: Lev Stipakov
---
src/openvpn/options.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 2f8915d..de6e453 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -2110,12 +2110,13 @@ options_postpr