Added MODULE_DATA_UNSET() macro and started using it. Just to make sure we

don't try to access free'd data.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1818 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-10-02 07:55:51 +00:00 committed by cras
commit c988af4150
4 changed files with 7 additions and 0 deletions

View file

@ -111,6 +111,7 @@ static void sig_connected(SERVER_REC *server)
static void sig_disconnected(SERVER_REC *server)
{
g_free(MODULE_DATA(server));
MODULE_DATA_UNSET(server);
}
static void sig_channel_created(CHANNEL_REC *channel)
@ -121,6 +122,7 @@ static void sig_channel_created(CHANNEL_REC *channel)
static void sig_channel_destroyed(CHANNEL_REC *channel)
{
g_free(MODULE_DATA(channel));
MODULE_DATA_UNSET(channel);
}
void fe_common_core_init(void)