Free cred->server before overwriting it
authorTheodore Tso <tytso@mit.edu>
Wed, 1 Dec 1993 22:24:15 +0000 (22:24 +0000)
committerTheodore Tso <tytso@mit.edu>
Wed, 1 Dec 1993 22:24:15 +0000 (22:24 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3058 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/gc_via_tgt.c

index 64d38d9b7d88d0173d610533b052e1fb79e298f1..d6ef9119bfa176e4d07fec539d4f442894f8f5b9 100644 (file)
@@ -202,6 +202,10 @@ OLDDECLARG(krb5_creds *, cred)
            return retval;
        }
     }
+    /*
+     * Free cred->server before overwriting it.
+     */
+    krb5_free_principal(cred->server);
     if (retval = krb5_copy_principal(dec_rep->enc_part2->server,
                                     &cred->server)) {
        cleanup();