]> git.ipfire.org Git - thirdparty/openvpn.git/commit
ssl_verify: Fix memleak if creating deferred auth control files fails
authorDavid Sommerseth <davids@openvpn.net>
Thu, 15 Dec 2022 19:01:37 +0000 (20:01 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 16 Dec 2022 07:50:54 +0000 (08:50 +0100)
commitcdfdfb3da0ce714f43b23f679a8ef9b36ab9f370
tree37b57b81aab248c323633394628a6b030483a2f9
parent566c0791caddc52e45c18b19cd650f79fe312e37
ssl_verify: Fix memleak if creating deferred auth control files fails

If the key_state_gen_auth_control_files() call fails, the code would
just return without freeing the argv container.  Instead the code should
jump to an appropriate exit point where memory is being released.

Also adjust the related comment, to indicate that these deferred auth
control files are really pre-created.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Reported-by: Trail of Bits (TOB-OVPN-2)
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20221215190143.2107896-3-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25737.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 0567da5377704cf64bd2599f2d49aa478d386941)
src/openvpn/ssl_verify.c