From ae9f37e3a89703df5818584774633b88b7843e83 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Mon, 7 May 1990 17:13:52 +0000 Subject: [PATCH] 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 --- src/lib/krb5/ccache/file/fcc_nseq.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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; } -- 2.26.2