From: Arne Schwabe Date: Mon, 25 Nov 2013 13:31:20 +0100 Message-Id: <1385382680-5912-9-git-send-email-arne@...1227...> In-Reply-To: <1385382680-5912-1-git-send-email-arne@...1227...> References: <1385382680-5912-1-git-send-email-arne@...1227...> Subject: [Openvpn-devel] [Patch v2 9/9] Move the initialization of the environment to the top so c2.es is initialized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net --- src/openvpn/init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index c54907c..e4f6af9 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -3339,6 +3339,10 @@ init_instance (struct context *c, const struct env_set *env, const unsigned int /* init garbage collection level */ gc_init (&c->c2.gc); + /* inherit environmental variables */ + if (env) + do_inherit_env (c, env); + /* signals caught here will abort */ c->sig->signal_received = 0; c->sig->signal_text = NULL; @@ -3390,10 +3394,6 @@ init_instance (struct context *c, const struct env_set *env, const unsigned int if (c->mode == CM_P2P || c->mode == CM_TOP) do_option_warnings (c); - /* inherit environmental variables */ - if (env) - do_inherit_env (c, env); - #ifdef ENABLE_PLUGIN /* initialize plugins */ if (c->mode == CM_P2P || c->mode == CM_TOP) -- 1.8.3.4 (Apple Git-47)