From f1642274ccf2a9b6bf1bc1409b3d8a5d75df561c Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 24 Dec 1993 22:35:00 +0000 Subject: [PATCH] Free memory on error git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3267 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/recvauth.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 2.26.2