summaryrefslogtreecommitdiff
path: root/src/memoserv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/memoserv.c')
-rw-r--r--src/memoserv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/memoserv.c b/src/memoserv.c
index e182f0535..716f1a1bc 100644
--- a/src/memoserv.c
+++ b/src/memoserv.c
@@ -192,7 +192,7 @@ static int delmemo(MemoInfo * mi, int num)
break;
}
if (i < mi->memocount) {
- moduleCleanStruct(mi->memos[i].moduleData);
+ moduleCleanStruct(&mi->memos[i].moduleData);
free(mi->memos[i].text); /* Deallocate memo text memory */
mi->memocount--; /* One less memo now */
if (i < mi->memocount) /* Move remaining memos down a slot */
@@ -315,8 +315,7 @@ void memo_send(User * u, char *name, char *text, int z)
mi->memos = srealloc(mi->memos, sizeof(Memo) * mi->memocount);
m = &mi->memos[mi->memocount - 1];
strscpy(m->sender, source, NICKMAX);
- for (j = 0; j < MAX_CMD_HASH; j++)
- m->moduleData[j] = NULL;
+ m->moduleData = NULL;
if (mi->memocount > 1) {
m->number = m[-1].number + 1;
if (m->number < 1) {
@@ -786,7 +785,7 @@ static int do_del(User * u)
/* Delete all memos. */
for (i = 0; i < mi->memocount; i++) {
free(mi->memos[i].text);
- moduleCleanStruct(mi->memos[i].moduleData);
+ moduleCleanStruct(&mi->memos[i].moduleData);
}
free(mi->memos);
mi->memos = NULL;