From cbc6d8e2edb1d8090c52b97bc32185ca2c651106 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Tue, 11 May 1999 12:06:15 +0000 Subject: [PATCH] fix past-o git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6203 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/mcache.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/krb5/mcache.c b/lib/krb5/mcache.c index 966010521..88967d3c2 100644 --- a/lib/krb5/mcache.c +++ b/lib/krb5/mcache.c @@ -166,10 +166,7 @@ mcc_get_first (krb5_context context, krb5_cc_cursor *cursor) { krb5_mcache *m = (krb5_mcache *)id->data.data; - - *cursor = malloc(sizeof(struct link*)); - - MCC_CURSOR(*cursor) = m->creds; + *cursor = m->creds; return 0; } @@ -181,9 +178,9 @@ mcc_get_next (krb5_context context, { struct link *l; - l = MCC_CURSOR(*cursor); + l = *cursor; if (l != NULL) { - MCC_CURSOR(*cursor) = l->next; + *cursor = l->next; return krb5_copy_creds_contents (context, &l->cred, creds); @@ -196,7 +193,6 @@ mcc_end_get (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) { - free(*cursor); return 0; }