summaryrefslogtreecommitdiff
path: root/gss-genr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gss-genr.c')
-rw-r--r--gss-genr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gss-genr.c b/gss-genr.c
index 842f38582..bf164a77b 100644
--- a/gss-genr.c
+++ b/gss-genr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gss-genr.c,v 1.20 2009/06/22 05:39:28 dtucker Exp $ */ 1/* $OpenBSD: gss-genr.c,v 1.21 2013/05/17 00:13:13 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
@@ -59,8 +59,8 @@ void
59ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len) 59ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len)
60{ 60{
61 if (ctx->oid != GSS_C_NO_OID) { 61 if (ctx->oid != GSS_C_NO_OID) {
62 xfree(ctx->oid->elements); 62 free(ctx->oid->elements);
63 xfree(ctx->oid); 63 free(ctx->oid);
64 } 64 }
65 ctx->oid = xmalloc(sizeof(gss_OID_desc)); 65 ctx->oid = xmalloc(sizeof(gss_OID_desc));
66 ctx->oid->length = len; 66 ctx->oid->length = len;
@@ -83,7 +83,7 @@ ssh_gssapi_error(Gssctxt *ctxt)
83 83
84 s = ssh_gssapi_last_error(ctxt, NULL, NULL); 84 s = ssh_gssapi_last_error(ctxt, NULL, NULL);
85 debug("%s", s); 85 debug("%s", s);
86 xfree(s); 86 free(s);
87} 87}
88 88
89char * 89char *
@@ -164,8 +164,8 @@ ssh_gssapi_delete_ctx(Gssctxt **ctx)
164 if ((*ctx)->name != GSS_C_NO_NAME) 164 if ((*ctx)->name != GSS_C_NO_NAME)
165 gss_release_name(&ms, &(*ctx)->name); 165 gss_release_name(&ms, &(*ctx)->name);
166 if ((*ctx)->oid != GSS_C_NO_OID) { 166 if ((*ctx)->oid != GSS_C_NO_OID) {
167 xfree((*ctx)->oid->elements); 167 free((*ctx)->oid->elements);
168 xfree((*ctx)->oid); 168 free((*ctx)->oid);
169 (*ctx)->oid = GSS_C_NO_OID; 169 (*ctx)->oid = GSS_C_NO_OID;
170 } 170 }
171 if ((*ctx)->creds != GSS_C_NO_CREDENTIAL) 171 if ((*ctx)->creds != GSS_C_NO_CREDENTIAL)
@@ -175,7 +175,7 @@ ssh_gssapi_delete_ctx(Gssctxt **ctx)
175 if ((*ctx)->client_creds != GSS_C_NO_CREDENTIAL) 175 if ((*ctx)->client_creds != GSS_C_NO_CREDENTIAL)
176 gss_release_cred(&ms, &(*ctx)->client_creds); 176 gss_release_cred(&ms, &(*ctx)->client_creds);
177 177
178 xfree(*ctx); 178 free(*ctx);
179 *ctx = NULL; 179 *ctx = NULL;
180} 180}
181 181
@@ -222,7 +222,7 @@ ssh_gssapi_import_name(Gssctxt *ctx, const char *host)
222 &gssbuf, GSS_C_NT_HOSTBASED_SERVICE, &ctx->name))) 222 &gssbuf, GSS_C_NT_HOSTBASED_SERVICE, &ctx->name)))
223 ssh_gssapi_error(ctx); 223 ssh_gssapi_error(ctx);
224 224
225 xfree(gssbuf.value); 225 free(gssbuf.value);
226 return (ctx->major); 226 return (ctx->major);
227} 227}
228 228