From 5bd932e0ebe6873f743b31b600b2a32982dd01db Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Dec 14 2012 01:13:20 +0000 Subject: Ticket 509 - lock-free access to be->be_suffixlock Fix Description: Previous commit 1b6f39cbb800b9c70abff1d025fecdd812a5b7b6 had a malloc size problem. Instead of the size of pointer, the size of struct suffixlist has to be allocated. --- diff --git a/ldap/servers/slapd/backend.c b/ldap/servers/slapd/backend.c index f964856..ad253f1 100644 --- a/ldap/servers/slapd/backend.c +++ b/ldap/servers/slapd/backend.c @@ -206,7 +206,7 @@ be_addsuffix(Slapi_Backend *be,const Slapi_DN *suffix) { struct suffixlist *new_suffix, *list; - new_suffix = (struct suffixlist *)slapi_ch_malloc(sizeof(struct suffixlist *)); + new_suffix = (struct suffixlist *)slapi_ch_malloc(sizeof(struct suffixlist)); new_suffix->be_suffix = slapi_sdn_dup(suffix); new_suffix->next = NULL;