* kdb_dbm.c (krb5_dbm_db_rename): Initialize pointer before use
authorEzra Peisach <epeisach@mit.edu>
Wed, 14 Feb 1996 02:40:31 +0000 (02:40 +0000)
committerEzra Peisach <epeisach@mit.edu>
Wed, 14 Feb 1996 02:40:31 +0000 (02:40 +0000)
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
src/lib/kdb/kdb_dbm.c

index d6609bc0c13b675d58cb239306456a4510b90cff..3984ce29b4c07607790640c831f1e3ceac01cc5d 100644 (file)
@@ -1,3 +1,8 @@
+Tue Feb 13 21:33:03 1996  Ezra Peisach  <epeisach@kangaroo.mit.edu>
+
+       * 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  <eichin@cygnus.com>
 
        * kdb_dbm.c (krb5_dbm_db_rename): O_EXCL is meaningless without
index b80a0a65cb49148a72ed88be1821bf635b36578d..dcef39b953aa9642247177b210c8375b80ef3ec2 100644 (file)
@@ -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) {