From: John Kohl Date: Wed, 20 Feb 1991 10:50:03 +0000 (+0000) Subject: plug a memory leak X-Git-Tag: krb5-1.0-alpha4~240 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=76a41c8bbb96796f4b55d88dab5c4df2a7348bf8;p=krb5.git plug a memory leak git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1732 dc483132-0cff-0310-8789-dd5450dbe970 --- 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 */