]> git.ipfire.org Git - thirdparty/openvpn.git/commit
delete_routes(_ipv6): avoid memleak if RT_DEFINED is not set
authorAntonio Quartulli <a@unstable.cc>
Sat, 17 Sep 2022 22:42:27 +0000 (00:42 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 18 Sep 2022 10:54:55 +0000 (12:54 +0200)
commit5ac33a88b10584c3e52dc0c01dad2571b75be239
treeb5b4dd29682f0f3c57dfde63ff8a541893b7f296
parent7de4be94e297ab1ea87ab17934f2026d7124239c
delete_routes(_ipv6): avoid memleak if RT_DEFINED is not set

In this case the function would exit without releasing the argv object
initialized via argv_new().

Move initialization of argv after thic check is performed.

While at it, also move the declaration of gc and initizlize it with
gc_new().

Reported-by: Camille Guérin <guerincamille56@gmail.com>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220917224227.16988-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25245.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/route.c