If a route structure is passed to add_route() or add_route_ipv6()
without the RT_DEFINED flag set, both functions leak an "argv"
structure allocation.
Add appropriate argv_free() calls.
Signed-off-by: David Korczynski <david@adalogics.com>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <
20210714162533.10098-1-david@adalogics.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22637.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
if (!(r->flags & RT_DEFINED))
{
+ argv_free(&argv);
return;
}
if (!(r6->flags & RT_DEFINED) )
{
+ argv_free(&argv);
return;
}