diff options
Diffstat (limited to 'gss-genr.c')
-rw-r--r-- | gss-genr.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gss-genr.c b/gss-genr.c index c2b4f2dd8..8d75ee5c7 100644 --- a/gss-genr.c +++ b/gss-genr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gss-genr.c,v 1.6 2005/10/13 22:24:31 stevesk Exp $ */ | 1 | /* $OpenBSD: gss-genr.c,v 1.7 2006/03/20 04:07:49 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. | 4 | * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. |
@@ -72,7 +72,11 @@ ssh_gssapi_set_oid(Gssctxt *ctx, gss_OID oid) | |||
72 | void | 72 | void |
73 | ssh_gssapi_error(Gssctxt *ctxt) | 73 | ssh_gssapi_error(Gssctxt *ctxt) |
74 | { | 74 | { |
75 | debug("%s", ssh_gssapi_last_error(ctxt, NULL, NULL)); | 75 | char *s; |
76 | |||
77 | s = ssh_gssapi_last_error(ctxt, NULL, NULL); | ||
78 | debug("%s", s); | ||
79 | xfree(s); | ||
76 | } | 80 | } |
77 | 81 | ||
78 | char * | 82 | char * |
@@ -231,11 +235,15 @@ ssh_gssapi_acquire_cred(Gssctxt *ctx) | |||
231 | gss_create_empty_oid_set(&status, &oidset); | 235 | gss_create_empty_oid_set(&status, &oidset); |
232 | gss_add_oid_set_member(&status, ctx->oid, &oidset); | 236 | gss_add_oid_set_member(&status, ctx->oid, &oidset); |
233 | 237 | ||
234 | if (gethostname(lname, MAXHOSTNAMELEN)) | 238 | if (gethostname(lname, MAXHOSTNAMELEN)) { |
239 | gss_release_oid_set(&status, &oidset); | ||
235 | return (-1); | 240 | return (-1); |
241 | } | ||
236 | 242 | ||
237 | if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) | 243 | if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) { |
244 | gss_release_oid_set(&status, &oidset); | ||
238 | return (ctx->major); | 245 | return (ctx->major); |
246 | } | ||
239 | 247 | ||
240 | if ((ctx->major = gss_acquire_cred(&ctx->minor, | 248 | if ((ctx->major = gss_acquire_cred(&ctx->minor, |
241 | ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds, NULL, NULL))) | 249 | ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds, NULL, NULL))) |