From: Wilfried Göesgens Date: Wed, 28 May 2008 22:08:57 +0000 (+0000) Subject: * lock the list just while adding the new piece into it. X-Git-Tag: v7.86~2195 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=310ed9dc05fc71e9f7fc7366f4c4f50e80cc9ed5;p=citadel.git * lock the list just while adding the new piece into it. --- diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 7ce6bc5ab..cb6dbae25 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -2905,14 +2905,14 @@ long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */ } if (collected_addresses != NULL) { - begin_critical_section(S_ATBF); aptr = (struct addresses_to_be_filed *) malloc(sizeof(struct addresses_to_be_filed)); - aptr->next = atbf; MailboxName(actual_rm, sizeof actual_rm, &CCC->user, USERCONTACTSROOM); aptr->roomname = strdup(actual_rm); aptr->collected_addresses = collected_addresses; + begin_critical_section(S_ATBF); + aptr->next = atbf; atbf = aptr; end_critical_section(S_ATBF); }