(NDBM_destroy): clear master key

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5761 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-03-25 03:39:15 +00:00
parent 2974b8e4cc
commit 34f25c0700

View File

@@ -50,6 +50,9 @@ struct ndbm_db {
static krb5_error_code static krb5_error_code
NDBM_destroy(krb5_context context, HDB *db) NDBM_destroy(krb5_context context, HDB *db)
{ {
krb5_error_code ret;
ret = hdb_clear_master_key (context, db);
free(db->name); free(db->name);
free(db); free(db);
return 0; return 0;
@@ -243,6 +246,7 @@ NDBM_open(krb5_context context, HDB *db, int flags, mode_t mode)
krb5_error_code ret; krb5_error_code ret;
struct ndbm_db *d = malloc(sizeof(*d)); struct ndbm_db *d = malloc(sizeof(*d));
char *lock_file; char *lock_file;
if(d == NULL) if(d == NULL)
return ENOMEM; return ENOMEM;
asprintf(&lock_file, "%s.lock", (char*)db->name); asprintf(&lock_file, "%s.lock", (char*)db->name);