From 508c2c9c8344e2b58cc83731d9673ba1479d51c8 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Wed, 14 Feb 1996 02:40:31 +0000 Subject: [PATCH] * kdb_dbm.c (krb5_dbm_db_rename): Initialize pointer before use for case where new db does not exist. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7477 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/ChangeLog | 5 +++++ src/lib/kdb/kdb_dbm.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index d6609bc0c..3984ce29b 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 13 21:33:03 1996 Ezra Peisach + + * kdb_dbm.c (krb5_dbm_db_rename): Initialize pointer before use + for case where new db does not exist. + Tue Jan 30 18:26:38 1996 Mark Eichin * kdb_dbm.c (krb5_dbm_db_rename): O_EXCL is meaningless without diff --git a/src/lib/kdb/kdb_dbm.c b/src/lib/kdb/kdb_dbm.c index b80a0a65c..dcef39b95 100644 --- a/src/lib/kdb/kdb_dbm.c +++ b/src/lib/kdb/kdb_dbm.c @@ -889,6 +889,8 @@ krb5_dbm_db_rename(context, from, to) * Set the database to the target, so that other processes sharing * the target will stop their activity, and notice the new database. */ + db_ctx = (krb5_db_context *) context->db_context; + retval = krb5_dbm_db_set_name(context, to); if (retval) { if (retval == ENOENT) @@ -897,7 +899,6 @@ krb5_dbm_db_rename(context, from, to) goto errout; } - db_ctx = (krb5_db_context *) context->db_context; db_ctx->db_lf_name = gen_dbsuffix(db_ctx->db_name, KDBM_LOCK_EXT(db_ctx)); if (db_ctx->db_lf_name == (char *)NULL) { -- 2.26.2