From 39a047e3c390542e9818faca1ff942839a7e6432 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Mon, 29 Jan 1990 17:02:14 +0000 Subject: [PATCH] move external declarations to include file rename include files erase key when cleaning up git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@190 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/kdb_dbm.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/lib/kdb/kdb_dbm.c b/src/lib/kdb/kdb_dbm.c index 7fb2fc5ce..77c4f4cd8 100644 --- a/src/lib/kdb/kdb_dbm.c +++ b/src/lib/kdb/kdb_dbm.c @@ -31,10 +31,11 @@ static char rcsid_krb_dbm_c[] = #include #include -#include -#include +#include +#include #include +#include #define KRB5_DBM_MAX_RETRY 5 @@ -48,11 +49,6 @@ extern long krb5_dbm_db_debug; extern char *progname; #endif -#ifdef __STDC__ -#include -#else -extern char *malloc(); -#endif /* __STDC__ */ extern int errno; @@ -569,7 +565,10 @@ static void free_decode_princ_contents(entry) krb5_db_entry *entry; { + /* erase the key */ + bzero((char *)entry->key, sizeof(*entry->key) + entry->key->length - 1); free((char *)entry->key); + krb5_free_principal(entry->principal); krb5_free_principal(entry->mod_name); (void) bzero((char *)entry, sizeof(*entry)); -- 2.26.2