]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
env_clean(): Previous OSX compile fix broke the function completely.
authorTimo Sirainen <tss@iki.fi>
Sat, 19 Nov 2011 20:29:31 +0000 (22:29 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 19 Nov 2011 20:29:31 +0000 (22:29 +0200)
src/lib/env-util.c

index 1282f8fccad63b7405a82c4c0cda549a4e7d558c..079ed9d3014ccd5056b59f895e92a283deecc8ec 100644 (file)
@@ -59,7 +59,7 @@ void env_clean(void)
        if (clearenv() < 0)
                i_fatal("clearenv() failed");
 #else
-       char **environ = *env_get_environ_p();
+       char ***environ_p = env_get_environ_p();
 
        /* Try to clear the environment.
 
@@ -68,7 +68,7 @@ void env_clean(void)
           c) environ = emptyenv doesn't work on Haiku OS
           d) environ = calloc() should work everywhere
        */
-       environ = calloc(1, sizeof(*environ));
+       *environ_p = calloc(1, sizeof(**environ_p));
 #endif
        if (env_pool != NULL)
                p_clear(env_pool);