]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Add calls to nvlist_destroy to avoid leaks
authorRémi Farault <remi.farault@stormshield.eu>
Tue, 29 Oct 2024 11:06:35 +0000 (12:06 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 5 Nov 2024 15:38:31 +0000 (16:38 +0100)
commita5d2544ca3a95eba0127ab9cc8a8277fd1d1f974
tree55381f33ea218e4223785d4164ccac3e70c35327
parentb98ff0e7c60c6592a2e8d2c80dfd5999e5d2e65b
Add calls to nvlist_destroy to avoid leaks

Some memory leaks were detected by valgrind on the openvpn daemon, using
DCO mode on a FreeBSD platform.  The leaks are caused by missing
nvlist_destroy calls in the file dco_freebsd.c.

Calls to nvlist_destroy were added, sometimes using local variables to
store nvlist pointers temporarly.  A valgrind run on the updated daemon
confirmed that  the leaks were gone.

Github: OpenVPN/openvpn#636
Signed-off-by: Rémi Farault <remi.farault@stormshield.eu>
Acked-by: Kristof Provost <kp@freebsd.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <f8845c0c5aa74e5bab537463249a251d@stormshield.eu>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29701.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit dee0748a1e0f57c326cf2b83f8499998ac9d1187)
src/openvpn/dco_freebsd.c