mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04:00
Set objects ->type = 0 when freeing to make sure we notice immediately if
they're being used after freed. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2399 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
dbb279a1fe
commit
0141801e2d
@ -75,6 +75,8 @@ void channel_destroy(CHANNEL_REC *channel)
|
||||
g_free_not_null(channel->key);
|
||||
g_free(channel->mode);
|
||||
g_free(channel->name);
|
||||
|
||||
channel->type = 0;
|
||||
g_free(channel);
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,8 @@ void query_destroy(QUERY_REC *query)
|
||||
g_free_not_null(query->server_tag);
|
||||
g_free_not_null(query->address);
|
||||
g_free(query->name);
|
||||
|
||||
query->type = 0;
|
||||
g_free(query);
|
||||
}
|
||||
|
||||
|
@ -402,6 +402,8 @@ int server_unref(SERVER_REC *server)
|
||||
g_free(server->away_reason);
|
||||
g_free(server->nick);
|
||||
g_free(server->tag);
|
||||
|
||||
server->type = 0;
|
||||
g_free(server);
|
||||
return FALSE;
|
||||
}
|
||||
@ -485,7 +487,9 @@ void server_connect_unref(SERVER_CONNECT_REC *conn)
|
||||
|
||||
g_free_not_null(conn->channels);
|
||||
g_free_not_null(conn->away_reason);
|
||||
g_free(conn);
|
||||
|
||||
conn->type = 0;
|
||||
g_free(conn);
|
||||
}
|
||||
|
||||
void server_change_nick(SERVER_REC *server, const char *nick)
|
||||
|
Loading…
Reference in New Issue
Block a user