]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix slow memory drain on each client renegotiation.
authorGert Doering <gert@greenie.muc.de>
Wed, 23 Oct 2013 15:54:05 +0000 (17:54 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 17 Nov 2013 12:57:14 +0000 (13:57 +0100)
commit4368147972d61b598bbcd5d2904d891130d5e517
tree965b01259e2eaf8de58fe31814e9100e868369ba
parentbbc3a6473c84ba7cdb87b359f016cd13773e42ec
Fix slow memory drain on each client renegotiation.

This reverts commit bee92b479414d12035b0422f81ac5fcfe14fa645 and parts
of commit dc7be6d078ba106f9b0de12f3e879c3561c3c537, as these introduced a
subtle memory drain on client renegotiations (es->gc got initialized,
which led to "unused" gc_entry records accumulating while a client is
connected).

Setting es->gc=NULL causes env_set_add_nolock() / remove_env_item() to
free() allocated and no longer used strings in the es, while an active
gc would leave them for cleanup with gc_free() at client disconnect time.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Conflicts:
src/openvpn/buffer.c
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Message-Id: <20131023162618.GP161@greenie.muc.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/7939
src/openvpn/buffer.c
src/openvpn/init.c
src/openvpn/openvpn.c