From 6830222bc5db64b553dfd48aee687aff11d87432 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sun, 18 Jul 2004 04:10:22 +0000 Subject: [PATCH] * cc_memory.c (krb5_mcc_store): When allocating krb5_mcc_link memory - allocate sizeof() - not sizeof(sizeof()). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16613 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/ChangeLog | 5 +++++ src/lib/krb5/ccache/cc_memory.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/ccache/ChangeLog b/src/lib/krb5/ccache/ChangeLog index 06666bdb3..c2a7e451a 100644 --- a/src/lib/krb5/ccache/ChangeLog +++ b/src/lib/krb5/ccache/ChangeLog @@ -1,3 +1,8 @@ +2004-07-18 Ezra Peisach + + * cc_memory.c (krb5_mcc_store): When allocating krb5_mcc_link + memory - allocate sizeof() - not sizeof(sizeof()). + 2004-07-16 Ken Raeburn * cc_file.c: Don't check for macsock.h. diff --git a/src/lib/krb5/ccache/cc_memory.c b/src/lib/krb5/ccache/cc_memory.c index 07e08ed8b..3dc9a7c2b 100644 --- a/src/lib/krb5/ccache/cc_memory.c +++ b/src/lib/krb5/ccache/cc_memory.c @@ -572,7 +572,7 @@ krb5_mcc_store(krb5_context ctx, krb5_ccache id, krb5_creds *creds) krb5_mcc_link *new_node; krb5_mcc_data *mptr = (krb5_mcc_data *)id->data; - new_node = malloc(sizeof(sizeof(krb5_mcc_link))); + new_node = malloc(sizeof(krb5_mcc_link)); if (new_node == NULL) return errno; err = krb5_copy_creds(ctx, creds, &new_node->creds); -- 2.26.2