summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1991-02-20 10:50:03 +0000
committerJohn Kohl <jtkohl@mit.edu>1991-02-20 10:50:03 +0000
commit76a41c8bbb96796f4b55d88dab5c4df2a7348bf8 (patch)
tree13241dbab9e038e4fa6474faa256d169ed98142a /src
parent10aa3e50c4e655b194963a55b4fd5ad5c10e6aad (diff)
plug a memory leak
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1732 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/get_in_tkt.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c
index 14be24f38..ec0567491 100644
--- a/src/lib/krb5/krb/get_in_tkt.c
+++ b/src/lib/krb5/krb/get_in_tkt.c
@@ -137,8 +137,10 @@ OLDDECLARG(krb5_ccache, ccache)
/* now decode the reply...could be error or as_rep */
if (krb5_is_krb_error(&reply)) {
- if (retval = decode_krb5_error(&reply, &err_reply))
+ if (retval = decode_krb5_error(&reply, &err_reply)) {
+ xfree(reply.data);
return retval; /* some other reply--??? */
+ }
/* it was an error */
if ((err_reply->ctime != request.nonce) ||
@@ -151,16 +153,22 @@ OLDDECLARG(krb5_ccache, ccache)
/* XXX somehow make error msg text available to application? */
krb5_free_error(err_reply);
+ xfree(reply.data);
return retval;
}
- if (!krb5_is_as_rep(&reply))
+ if (!krb5_is_as_rep(&reply)) {
+ xfree(reply.data);
return KRB5KRB_AP_ERR_MSG_TYPE;
- if (retval = decode_krb5_as_rep(&reply, &as_reply))
+ }
+ if (retval = decode_krb5_as_rep(&reply, &as_reply)) {
+ xfree(reply.data);
return retval; /* some other reply--??? */
-
- if (as_reply->msg_type != KRB5_AS_REP)
+ }
+ xfree(reply.data);
+ if (as_reply->msg_type != KRB5_AS_REP) {
return KRB5KRB_AP_ERR_MSG_TYPE;
+ }
/* it was a kdc_rep--decrypt & check */