Martin Gadbois wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Gadbois wrote:
Using OpenVPN 2.0.5 and 2.0.9, I notice that an somewhat idle connection
increases the RSS of the server process linearly with time.
Here is my patch to fix this issue. It does create (according to
valgrind) a memory leak, but it does not increase with time. Feel free
to fix it better...
I short, environments values were allocated using gc*(), and every key
change the environement list changes, but the allocated values stayed in
the context's gc.
I modified the environement values to always allocate using malloc() and
always free() values when the env list changes.
I've committed a fix for this issue:
------------------------------------------------------------------------
r2981 | james | 2008-06-04 01:23:20 -0600 (Wed, 04 Jun 2008) | 6 lines
Changed paths:
M /branches/BETA21/openvpn/debug/valgrind-suppress
M /branches/BETA21/openvpn/doval
M /branches/BETA21/openvpn/openvpn.c
Fixed unbounded memory growth bug in
environmental variable code that could
have caused long-running OpenVPN sessions
with many TLS renegotiations to incrementally
increase memory usage over time.
------------------------------------------------------------------------
James