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 f9b39cfd5..630c263da 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-2009 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
@@ -214,8 +214,8 @@ void
214ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len) 214ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len)
215{ 215{
216 if (ctx->oid != GSS_C_NO_OID) { 216 if (ctx->oid != GSS_C_NO_OID) {
217 xfree(ctx->oid->elements); 217 free(ctx->oid->elements);
218 xfree(ctx->oid); 218 free(ctx->oid);
219 } 219 }
220 ctx->oid = xmalloc(sizeof(gss_OID_desc)); 220 ctx->oid = xmalloc(sizeof(gss_OID_desc));
221 ctx->oid->length = len; 221 ctx->oid->length = len;
@@ -238,7 +238,7 @@ ssh_gssapi_error(Gssctxt *ctxt)
238 238
239 s = ssh_gssapi_last_error(ctxt, NULL, NULL); 239 s = ssh_gssapi_last_error(ctxt, NULL, NULL);
240 debug("%s", s); 240 debug("%s", s);
241 xfree(s); 241 free(s);
242} 242}
243 243
244char * 244char *
@@ -319,8 +319,8 @@ ssh_gssapi_delete_ctx(Gssctxt **ctx)
319 if ((*ctx)->name != GSS_C_NO_NAME) 319 if ((*ctx)->name != GSS_C_NO_NAME)
320 gss_release_name(&ms, &(*ctx)->name); 320 gss_release_name(&ms, &(*ctx)->name);
321 if ((*ctx)->oid != GSS_C_NO_OID) { 321 if ((*ctx)->oid != GSS_C_NO_OID) {
322 xfree((*ctx)->oid->elements); 322 free((*ctx)->oid->elements);
323 xfree((*ctx)->oid); 323 free((*ctx)->oid);
324 (*ctx)->oid = GSS_C_NO_OID; 324 (*ctx)->oid = GSS_C_NO_OID;
325 } 325 }
326 if ((*ctx)->creds != GSS_C_NO_CREDENTIAL) 326 if ((*ctx)->creds != GSS_C_NO_CREDENTIAL)
@@ -330,7 +330,7 @@ ssh_gssapi_delete_ctx(Gssctxt **ctx)
330 if ((*ctx)->client_creds != GSS_C_NO_CREDENTIAL) 330 if ((*ctx)->client_creds != GSS_C_NO_CREDENTIAL)
331 gss_release_cred(&ms, &(*ctx)->client_creds); 331 gss_release_cred(&ms, &(*ctx)->client_creds);
332 332
333 xfree(*ctx); 333 free(*ctx);
334 *ctx = NULL; 334 *ctx = NULL;
335} 335}
336 336
@@ -377,7 +377,7 @@ ssh_gssapi_import_name(Gssctxt *ctx, const char *host)
377 &gssbuf, GSS_C_NT_HOSTBASED_SERVICE, &ctx->name))) 377 &gssbuf, GSS_C_NT_HOSTBASED_SERVICE, &ctx->name)))
378 ssh_gssapi_error(ctx); 378 ssh_gssapi_error(ctx);
379 379
380 xfree(gssbuf.value); 380 free(gssbuf.value);
381 return (ctx->major); 381 return (ctx->major);
382} 382}
383 383