Set `ret_as_reply' if != NULL

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2681 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-08-01 15:30:24 +00:00
parent ef61ce3ee6
commit c8234b481f

View File

@@ -241,7 +241,7 @@ krb5_get_in_tkt(krb5_context context,
krb5_const_pointer decryptarg, krb5_const_pointer decryptarg,
krb5_creds *creds, krb5_creds *creds,
krb5_ccache ccache, krb5_ccache ccache,
krb5_kdc_rep **ret_as_reply) krb5_kdc_rep *ret_as_reply)
{ {
krb5_error_code ret; krb5_error_code ret;
AS_REQ a; AS_REQ a;
@@ -406,8 +406,11 @@ krb5_get_in_tkt(krb5_context context,
free (key); free (key);
#endif #endif
free_KDC_REP(&rep.part1); if (ret_as_reply)
free_EncTGSRepPart(&rep.part2); *ret_as_reply = rep;
else
krb5_free_kdc_rep (context, &rep);
if(ret) if(ret)
return ret; return ret;
ret = krb5_cc_store_cred (context, ccache, creds); ret = krb5_cc_store_cred (context, ccache, creds);