dovecot-2.0: env_clean(): Clear the environment memory pool also.

dovecot at dovecot.org dovecot at dovecot.org
Mon May 18 04:37:10 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/6e80c8fb225e
changeset: 9319:6e80c8fb225e
user:      Timo Sirainen <tss at iki.fi>
date:      Sun May 17 21:02:38 2009 -0400
description:
env_clean(): Clear the environment memory pool also.
We trust that nowadays our environment clearing code works everywhere.

diffstat:

1 file changed, 2 insertions(+), 2 deletions(-)
src/lib/env-util.c |    4 ++--

diffs (12 lines):

diff -r 92be0f90a9df -r 6e80c8fb225e src/lib/env-util.c
--- a/src/lib/env-util.c	Sun May 17 21:01:45 2009 -0400
+++ b/src/lib/env-util.c	Sun May 17 21:02:38 2009 -0400
@@ -56,6 +56,6 @@ void env_clean(void)
 	*/
 	environ = calloc(1, sizeof(*environ));
 #endif
-	/* don't clear the env_pool, otherwise the environment would get
-	   corrupted if we failed to clear it. */
+	if (env_pool != NULL)
+		p_clear(env_pool);
 }


More information about the dovecot-cvs mailing list