Attention is currently required from: Arne Schwabe, Gert Doering, Răzvan 
Cojocaru.

Hello Arne Schwabe, Gert Doering,

I'd like you to reexamine a change. Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2092?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review-1 by Gert Doering


Change subject: tun: free gc arena in windows_set_mtu()
......................................................................

tun: free gc arena in windows_set_mtu()

The arena used for strerror_win32() was never freed. Allocate it
only on the error path, where it is used.

Broken since 0213f80e ("Set the correct mtu on windows based systems").

Change-Id: I80b9969f555d670bc101635318d245d1b2de8ec5
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpn/tun.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/92/2092/2

diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index fdd13ae..58f4750 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -5203,7 +5203,6 @@
 windows_set_mtu(const int iface_index, const short family, const int mtu)
 {
     DWORD err = 0;
-    struct gc_arena gc = gc_new();
     MIB_IPINTERFACE_ROW ipiface;
     InitializeIpInterfaceEntry(&ipiface);
     const char *family_name = (family == AF_INET6) ? "IPv6" : "IPv4";
@@ -5228,8 +5227,10 @@

     if (err != NO_ERROR)
     {
+        struct gc_arena gc = gc_new();
         msg(M_WARN, "TUN: Setting %s mtu failed: %s [status=%lu if_index=%d]", 
family_name,
             strerror_win32(err, &gc), err, iface_index);
+        gc_free(&gc);
     }
     else
     {

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2092?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I80b9969f555d670bc101635318d245d1b2de8ec5
Gerrit-Change-Number: 2092
Gerrit-PatchSet: 2
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Gert Doering <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Răzvan Cojocaru <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
Gerrit-Attention: Gert Doering <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to