Browse Source

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.
Noriko Hosoi 13 years ago
parent
commit
5bd932e0eb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ldap/servers/slapd/backend.c

+ 1 - 1
ldap/servers/slapd/backend.c

@@ -206,7 +206,7 @@ be_addsuffix(Slapi_Backend *be,const Slapi_DN *suffix)
 	{
 	{
 		struct suffixlist *new_suffix, *list;
 		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->be_suffix = slapi_sdn_dup(suffix);
 		new_suffix->next = NULL;
 		new_suffix->next = NULL;