summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2011-11-28 23:06:03 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2012-01-05 19:53:19 +0100
commitc70f39a842eb24baed09d9249303503852036e13 (patch)
treea22f3ea38b477ef1aabb77971a8ffda8a91ba4b8
parent35b61c51435d9f9095ced8949c045d50ac3c7018 (diff)
downloadeurephia-c70f39a842eb24baed09d9249303503852036e13.tar.gz
eurephia-c70f39a842eb24baed09d9249303503852036e13.tar.xz
eurephia-c70f39a842eb24baed09d9249303503852036e13.zip
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 <dazo@users.sourceforge.net>
-rw-r--r--plugin/eurephia-auth.c5
1 files changed, 4 insertions, 1 deletions
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;
}