mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
When destroying data used from server in "server disconnected" signal, set
the data to NULL as well, the server record is still used after the signal is finished (the channels it uses are destroyed, which may trigger scripts etc.) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2046 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
1a80491f81
commit
0abb62a471
@ -97,6 +97,8 @@ static void sig_disconnected(IRC_SERVER_REC *server)
|
||||
g_slist_free(rec->queries[n]);
|
||||
g_slist_free(rec->current_queries);
|
||||
g_free(rec);
|
||||
|
||||
server->chanqueries = NULL;
|
||||
}
|
||||
|
||||
/* Add channel to query list */
|
||||
|
@ -216,6 +216,7 @@ static void sig_disconnected(IRC_SERVER_REC *server)
|
||||
return;
|
||||
|
||||
g_slist_free(server->ctcpqueue);
|
||||
server->ctcpqueue = NULL;
|
||||
}
|
||||
|
||||
void ctcp_init(void)
|
||||
|
@ -265,11 +265,12 @@ static void sig_disconnected(IRC_SERVER_REC *server)
|
||||
server_redirect_destroy(tmp->next->data);
|
||||
}
|
||||
g_slist_free(server->cmdqueue);
|
||||
server->cmdqueue = NULL;
|
||||
|
||||
g_free_not_null(server->real_address);
|
||||
g_free_not_null(server->usermode);
|
||||
g_free_not_null(server->userhost);
|
||||
g_free_not_null(server->last_invite);
|
||||
g_free_and_null(server->real_address);
|
||||
g_free_and_null(server->usermode);
|
||||
g_free_and_null(server->userhost);
|
||||
g_free_and_null(server->last_invite);
|
||||
}
|
||||
|
||||
static void sig_server_quit(IRC_SERVER_REC *server, const char *msg)
|
||||
|
@ -357,6 +357,7 @@ static void sig_disconnected(IRC_SERVER_REC *server)
|
||||
g_hash_table_foreach(server->splits,
|
||||
(GHFunc) netsplit_destroy_hash, server);
|
||||
g_hash_table_destroy(server->splits);
|
||||
server->splits = NULL;
|
||||
}
|
||||
|
||||
static int split_server_check(void *key, NETSPLIT_REC *rec,
|
||||
|
@ -522,9 +522,12 @@ static void sig_disconnected(IRC_SERVER_REC *server)
|
||||
g_slist_foreach(server->redirects,
|
||||
(GFunc) server_redirect_destroy, NULL);
|
||||
g_slist_free(server->redirects);
|
||||
server->redirects = NULL;
|
||||
|
||||
if (server->redirect_next != NULL)
|
||||
server_redirect_destroy(server->redirect_next);
|
||||
if (server->redirect_next != NULL) {
|
||||
server_redirect_destroy(server->redirect_next);
|
||||
server->redirect_next = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void cmd_redirect_destroy(char *key, REDIRECT_CMD_REC *cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user