From: Theodore Tso Date: Fri, 24 Dec 1993 22:35:00 +0000 (+0000) Subject: Free memory on error X-Git-Tag: krb5-1.0-beta3~81 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f1642274ccf2a9b6bf1bc1409b3d8a5d75df561c;p=krb5.git Free memory on error git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3267 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/recvauth.c b/src/lib/krb5/krb/recvauth.c index f8b106beb..8104be33c 100644 --- a/src/lib/krb5/krb/recvauth.c +++ b/src/lib/krb5/krb/recvauth.c @@ -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