After freeing dbprinc, reset it to null
authorKen Raeburn <raeburn@mit.edu>
Wed, 6 Aug 2008 16:46:52 +0000 (16:46 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 6 Aug 2008 16:46:52 +0000 (16:46 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20619 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kdb/kdb_log.c

index c4efc41e065ab3b919d9f620f3e7eb4625b15be0..be5853ccc574656ae8f361eb6b1d92a6dc049594 100644 (file)
@@ -381,8 +381,10 @@ ulog_replay(krb5_context context, kdb_incr_result_t *incr_ret, char **db_args)
                                                     dbprinc,
                                                     &nentry);
 
-           if (dbprinc)
+           if (dbprinc) {
                krb5_free_principal(context, dbprinc);
+               dbprinc = NULL;
+           }
 
            if (retval)
                goto cleanup;