diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2011-11-28 23:06:03 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2012-01-05 19:53:19 +0100 |
commit | c70f39a842eb24baed09d9249303503852036e13 (patch) | |
tree | a22f3ea38b477ef1aabb77971a8ffda8a91ba4b8 | |
parent | 35b61c51435d9f9095ced8949c045d50ac3c7018 (diff) | |
download | eurephia-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.c | 5 |
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; } |