From: Alexandre Laroche <[email protected]>

CLEAR(dco) zeroes the local pointer variable instead of the
dco_context_t it points to, so the context keeps the nl_cb and
nl_cb_notify pointers that were just released with nl_cb_put().

No functional change today, since close_tun() frees the tuntap right
after, but use CLEAR(*dco) as intended.

GitHub: closes OpenVPN/openvpn#1143

Assisted-by: Claude Code:claude-opus-5-5
Change-Id: Idb22f731a00158ff020a819081a07e1235d8323d
Signed-off-by: Alexandre Laroche <[email protected]>
Acked-by: Arne Schwabe <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2156
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2156
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Arne Schwabe <[email protected]>

        
diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c
index 4412ad0..a84e310 100644
--- a/src/openvpn/dco_linux.c
+++ b/src/openvpn/dco_linux.c
@@ -537,7 +537,7 @@
     nl_cb_put(dco->nl_cb);
     nl_cb_put(dco->nl_cb_notify);
 
-    CLEAR(dco);
+    CLEAR(*dco);
 }
 
 int


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

Reply via email to