From: John Kohl Date: Mon, 7 May 1990 17:13:52 +0000 (+0000) Subject: can't free creds, it is passed in, but we can free the components X-Git-Tag: krb5-1.0-alpha2~639 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ae9f37e3a89703df5818584774633b88b7843e83;p=krb5.git can't free creds, it is passed in, but we can free the components git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@764 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/file/fcc_nseq.c b/src/lib/krb5/ccache/file/fcc_nseq.c index 8038ba6de..2826772b8 100644 --- a/src/lib/krb5/ccache/file/fcc_nseq.c +++ b/src/lib/krb5/ccache/file/fcc_nseq.c @@ -93,7 +93,19 @@ krb5_fcc_next_cred(id, cursor, creds) ((krb5_fcc_data *) id->data)->fd = -1; } lose: - if (kret != KRB5_OK) - krb5_free_creds(creds); + if (kret != KRB5_OK) { + if (creds->client) + krb5_free_principal(creds->client); + if (creds->server) + krb5_free_principal(creds->server); + if (creds->keyblock.contents) + xfree(creds->keyblock.contents); + if (creds->ticket.data) + xfree(creds->ticket.data); + if (creds->second_ticket.data) + xfree(creds->second_ticket.data); + if (creds->addresses) + krb5_free_address(creds->addresses); + } return kret; }