Free memory on error
authorTheodore Tso <tytso@mit.edu>
Fri, 24 Dec 1993 22:35:00 +0000 (22:35 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 24 Dec 1993 22:35:00 +0000 (22:35 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3267 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/recvauth.c

index f8b106bebe908a4add95ed6cee54fcfe49427e08..8104be33c8cc667923cb258333e7378478fa327e 100644 (file)
@@ -297,10 +297,12 @@ krb5_recvauth(/* IN */
         * up, and exit.
         */
        if (client)
-               if (retval =
-                   krb5_copy_principal(authdat->ticket->enc_part2->client,
-                                       client))
-                       return(retval);
+           if (retval =
+               krb5_copy_principal(authdat->ticket->enc_part2->client,
+                                   client)) {
+               krb5_free_tkt_authent(authdat);
+               return(retval);
+           }
        /*
         * The following efficiency hack assumes knowledge about the
         * structure of krb5_tkt_authent.  If we later add additional