diff options
Diffstat (limited to '')
-rw-r--r-- | plugin/auth-pam/auth-pam.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/auth-pam/auth-pam.c b/plugin/auth-pam/auth-pam.c index 52c62db..b029f85 100644 --- a/plugin/auth-pam/auth-pam.c +++ b/plugin/auth-pam/auth-pam.c @@ -305,6 +305,8 @@ openvpn_plugin_open_v1 (unsigned int *type_mask, const char *argv[], const char * Allocate our context */ context = (struct auth_pam_context *) calloc (1, sizeof (struct auth_pam_context)); + if (!context) + goto error; context->foreground_fd = -1; /* @@ -492,7 +494,7 @@ openvpn_plugin_abort_v1 (openvpn_plugin_handle_t handle) struct auth_pam_context *context = (struct auth_pam_context *) handle; /* tell background process to exit */ - if (context->foreground_fd >= 0) + if (context && context->foreground_fd >= 0) { send_control (context->foreground_fd, COMMAND_EXIT); close (context->foreground_fd); |