Skip to contentSkip to conversation

networking_iproute2: fix memory leak in net_iface_mtu_set()

PATCH In review Steffan Karger 3 participants 3 messages Oct 9, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 networking_iproute2: fix memory leak in net_iface_mtu_set()

ASAN yelled at me that someone forgot to call argv_free(). Fix that.

---
 src/openvpn/networking_iproute2.c | 2 ++
 1 file changed, 2 insertions(+)
src/openvpn/networking_iproute2.c +2 -0
index f3b9c614..3b460527 100644
@@ -88,6 +88,8 @@ net_iface_mtu_set(openvpn_net_ctx_t *ctx, const char *iface, uint32_t mtu)
     argv_msg(M_INFO, &argv);
     openvpn_execve_check(&argv, ctx->es, S_FATAL, "Linux ip link set failed");
 
+    argv_free(&argv);
+
     return 0;
 }
 
Signature · 1 line
2.25.1
#2 lore raw
In reply to Steffan Karger

Yeah, very obvious when you look at it :-) (wasn't *me* who ACKed that commit... but I had to check to be sure ;-) )

Your patch has been applied to the master and release/2.5 branch.

commit 1e6e083e8888042d58f9541bf74d343d52fc5681 (master) commit a9c8225439f0acaa679ee59244b5b8660b561592 (release/2.5)

Author: Steffan Karger
Date:   Fri Oct 9 15:46:03 2020 +0200
     networking_iproute2: fix memory leak in net_iface_mtu_set()

     Signed-off-by: Steffan Karger <[email protected]...>
     Acked-by: Antonio Quartulli <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg21189.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering