From c70f39a842eb24baed09d9249303503852036e13 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Mon, 28 Nov 2011 23:06:03 +0100 Subject: eurephia-auth: eurephiaInit() may not always return a context Check if we have a context available before setting ctx->tuntype. Signed-off-by: David Sommerseth --- plugin/eurephia-auth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/eurephia-auth.c b/plugin/eurephia-auth.c index 9245a40..e0669fa 100644 --- a/plugin/eurephia-auth.c +++ b/plugin/eurephia-auth.c @@ -208,7 +208,10 @@ OPENVPN_EXPORT openvpn_plugin_handle_t openvpn_plugin_open_v1(unsigned int *type // Setup a eurephia context context = eurephiaInit(argv, envp); - context->tuntype = tuntype_UNKN; // Make sure tunnel type is unknown + if( context ) { + // Make sure tunnel type is unknown + context->tuntype = tuntype_UNKN; + } return (openvpn_plugin_handle_t) context; } -- cgit