diff options
-rw-r--r-- | src/irc/core/channels-query.c | 2 | ||||
-rw-r--r-- | src/irc/core/ctcp.c | 1 | ||||
-rw-r--r-- | src/irc/core/irc-servers.c | 9 | ||||
-rw-r--r-- | src/irc/core/netsplit.c | 1 | ||||
-rw-r--r-- | src/irc/core/servers-redirect.c | 7 |
5 files changed, 14 insertions, 6 deletions
diff --git a/src/irc/core/channels-query.c b/src/irc/core/channels-query.c index 42d98f84..aa4130ed 100644 --- a/src/irc/core/channels-query.c +++ b/src/irc/core/channels-query.c @@ -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 */ diff --git a/src/irc/core/ctcp.c b/src/irc/core/ctcp.c index b3d56fb6..5231f53d 100644 --- a/src/irc/core/ctcp.c +++ b/src/irc/core/ctcp.c @@ -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) diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 2d4dcbcc..30f99684 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -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) diff --git a/src/irc/core/netsplit.c b/src/irc/core/netsplit.c index 85df67fd..594f5f8e 100644 --- a/src/irc/core/netsplit.c +++ b/src/irc/core/netsplit.c @@ -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, diff --git a/src/irc/core/servers-redirect.c b/src/irc/core/servers-redirect.c index 495423bc..39c5650e 100644 --- a/src/irc/core/servers-redirect.c +++ b/src/irc/core/servers-redirect.c @@ -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) |