1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-28 15:36:37 +02:00

Fixed pointer confusing in ModData system and made UnrealIRCd free all client ModData structures on client exit.

This commit is contained in:
Bram Matthys
2015-05-18 16:42:01 +02:00
parent 347609d958
commit 6f4ea900c1
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -131,7 +131,7 @@ ModDataInfo *md;
if (md->type == MODDATATYPE_CLIENT)
{
if (md->free && moddata_client(acptr, md).ptr)
md->free(moddata_client(acptr, md).ptr);
md->free(&moddata_client(acptr, md));
}
memset(acptr->moddata, 0, sizeof(acptr->moddata));
@@ -145,7 +145,7 @@ ModDataInfo *md;
if (md->type == MODDATATYPE_CHANNEL)
{
if (md->free && moddata_channel(chptr, md).ptr)
md->free(moddata_channel(chptr, md).ptr);
md->free(&moddata_channel(chptr, md));
}
memset(chptr->moddata, 0, sizeof(chptr->moddata));
@@ -159,7 +159,7 @@ ModDataInfo *md;
if (md->type == MODDATATYPE_MEMBER)
{
if (md->free && moddata_member(m, md).ptr)
md->free(moddata_member(m, md).ptr);
md->free(&moddata_member(m, md));
}
memset(m->moddata, 0, sizeof(m->moddata));
@@ -173,7 +173,7 @@ ModDataInfo *md;
if (md->type == MODDATATYPE_MEMBERSHIP)
{
if (md->free && moddata_membership(m, md).ptr)
md->free(moddata_membership(m, md).ptr);
md->free(&moddata_membership(m, md));
}
memset(m->moddata, 0, sizeof(m->moddata));