From b5f1c5ea0435c02200283806e7606c3c47731c13 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 11 Jun 1996 23:28:50 +0000 Subject: [PATCH] * keytab.c (krb5_ktkdb_close): Free memory allocated by krb5_ktkdb_resolve. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8291 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/ChangeLog | 5 +++++ src/lib/kdb/keytab.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index a8c32452e..fa274c12a 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,8 @@ +Tue Jun 11 19:27:22 1996 Ezra Peisach + + * keytab.c (krb5_ktkdb_close): Free memory allocated by + krb5_ktkdb_resolve. + Mon May 20 18:02:07 1996 Theodore Ts'o * kdb_dbm.c (krb5_dbm_db_create): Remove vestigal ODBM support. diff --git a/src/lib/kdb/keytab.c b/src/lib/kdb/keytab.c index a4e83e2a5..7609274d3 100644 --- a/src/lib/kdb/keytab.c +++ b/src/lib/kdb/keytab.c @@ -77,7 +77,18 @@ krb5_ktkdb_close(context, kt) krb5_context context; krb5_keytab kt; { - /* no state outstanding... */ + /* + * This routine is responsible for freeing all memory allocated + * for this keytab. There are no system resources that need + * to be freed nor are there any open files. + * + * This routine should undo anything done by krb5_ktkdb_resolve(). + */ + + krb5_xfree(kt->data); + kt->ops = 0; + krb5_xfree(kt); + return 0; } -- 2.26.2