From 8278fa6ede7acfffaa1040982ec21d75511d11f6 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 13 Sep 1995 19:33:23 +0000 Subject: [PATCH] Free the auth context when freeing the GSSAPI context structure git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6776 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 8 ++++++++ src/lib/gssapi/krb5/delete_sec_context.c | 3 +++ src/lib/gssapi/krb5/export_sec_context.c | 3 +++ 3 files changed, 14 insertions(+) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 35a20d210..777d37d2f 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,11 @@ +Tue Sep 12 19:07:52 1995 Theodore Y. Ts'o + + * export_sec_context.c (krb5_gss_export_sec_context): Free the + auth context when freeing the GSSAPI context structure. + + * delete_sec_context.c (krb5_gss_delete_sec_context): Free the + auth context when freeing the GSSAPI context structure. + Tue Sep 12 13:05:51 1995 Ezra Peisach * k5seal.c, k5unseal.c, accept_sec_context.c: Undo MACINTOSH diff --git a/src/lib/gssapi/krb5/delete_sec_context.c b/src/lib/gssapi/krb5/delete_sec_context.c index 8127ea61e..c23bfcca5 100644 --- a/src/lib/gssapi/krb5/delete_sec_context.c +++ b/src/lib/gssapi/krb5/delete_sec_context.c @@ -80,6 +80,9 @@ krb5_gss_delete_sec_context(context, minor_status, context_handle, output_token) krb5_free_principal(context, ctx->there); krb5_free_keyblock(context, ctx->subkey); + if (ctx->auth_context) + krb5_auth_con_free(context, ctx->auth_context); + xfree(ctx); /* zero the handle itself */ diff --git a/src/lib/gssapi/krb5/export_sec_context.c b/src/lib/gssapi/krb5/export_sec_context.c index 4f07bcb5a..01dbf9773 100644 --- a/src/lib/gssapi/krb5/export_sec_context.c +++ b/src/lib/gssapi/krb5/export_sec_context.c @@ -95,6 +95,9 @@ krb5_gss_export_sec_context(context, krb5_free_principal(ctx->context, ctx->there); krb5_free_keyblock(ctx->context, ctx->subkey); + if (ctx->auth_context) + krb5_auth_con_free(context, ctx->auth_context); + /* Zero out context */ memset(ctx, 0, sizeof(*ctx)); xfree(ctx); -- 2.26.2