Skip to contentSkip to conversation

Avoid leak in add_route.

PATCH In review David Korczynski 2 participants 2 messages Jul 14, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Avoid leak in add_route.

---
 src/openvpn/route.c | 1 +
 1 file changed, 1 insertion(+)
src/openvpn/route.c +1 -0
index 3b2af8b4..e429e8c0 100644
@@ -1584,6 +1584,7 @@ add_route(struct route_ipv4 *r,
 
     if (!(r->flags & RT_DEFINED))
     {
+        argv_free(&argv);
         return;
     }
 

--
2.17.1

ADA Logics Ltd is registered in England. No: 11624074. Registered office: 266 Banbury Road, Post Box 292, OX2 7DL, Oxford, Oxfordshire , United Kingdom

#1 lore raw

Hi,

Quoted 1 line · David Korczynski

This is good :-)

Quoted 9 lines
---
 src/openvpn/route.c | 1 +
 1 file changed, 1 insertion(+)
src/openvpn/route.c +0 -0
index 3b2af8b4..e429e8c0 100644

src/openvpn/route.c add_route(struct route_ipv4 *r, · line 1589

Quoted 6 lines
src/openvpn/route.c +1 -0
@@ -1584,6 +1584,7 @@ add_route(struct route_ipv4 *r,
 
     if (!(r->flags & RT_DEFINED))
     {
+        argv_free(&argv);
         return;
     }

... as is this. Can you send a single patch that contains both fixes?

We try to make patch granularity a good compromise - not too many individual patches, so "two one-line fixes for the same problem" would go into one common patch, not two.

thanks,

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...