summaryrefslogtreecommitdiffstats
path: root/proxy/src
diff options
context:
space:
mode:
Diffstat (limited to 'proxy/src')
-rw-r--r--proxy/src/client/gpm_accept_sec_context.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/proxy/src/client/gpm_accept_sec_context.c b/proxy/src/client/gpm_accept_sec_context.c
index bbacd5a..375ee17 100644
--- a/proxy/src/client/gpm_accept_sec_context.c
+++ b/proxy/src/client/gpm_accept_sec_context.c
@@ -74,11 +74,13 @@ OM_uint32 gpm_accept_sec_context(OM_uint32 *minor_status,
}
}
- if (res->context_handle) {
- ctx = res->context_handle;
- /* we are stealing the delegated creds on success, so we do not want
- * it to be freed by xdr_free */
- res->context_handle = NULL;
+ ctx = res->context_handle;
+ /* we are stealing the delegated creds on success, so we do not want
+ * it to be freed by xdr_free */
+ res->context_handle = NULL;
+ if (ctx == NULL) {
+ ret = EINVAL;
+ goto done;
}
if (src_name) {