]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
env_clean(): Clear the environment memory pool also.
authorTimo Sirainen <tss@iki.fi>
Mon, 18 May 2009 01:02:38 +0000 (21:02 -0400)
committerTimo Sirainen <tss@iki.fi>
Mon, 18 May 2009 01:02:38 +0000 (21:02 -0400)
We trust that nowadays our environment clearing code works everywhere.

--HG--
branch : HEAD

src/lib/env-util.c

index c73616be1dd533a0b220afaf6eedcaaf1d5ade4b..47feb4e31c935c7b4d765b76afeffc0e86abb316 100644 (file)
@@ -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);
 }