From: Ezra Peisach Date: Wed, 14 Feb 1996 02:40:31 +0000 (+0000) Subject: * kdb_dbm.c (krb5_dbm_db_rename): Initialize pointer before use X-Git-Tag: krb5-1.0-beta6~511 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=508c2c9c8344e2b58cc83731d9673ba1479d51c8;p=krb5.git * 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 --- 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) {