summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-12-10 20:30:03 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-12-10 20:30:03 +0000
commit6825f1e67eb5ccf5083ef5e848f9c9f8de222170 (patch)
tree61d23cd280d3f70c2bdb09bdd4c2f97c4dde4540 /src/irc
parentbb55d3ff4d0b9f889f3c9834c10ad014f2edf9a1 (diff)
downloadirssi-6825f1e67eb5ccf5083ef5e848f9c9f8de222170.zip
GC fixes.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3056 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/core/mode-lists.c4
-rw-r--r--src/irc/dcc/dcc.c2
-rw-r--r--src/irc/flood/flood.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/irc/core/mode-lists.c b/src/irc/core/mode-lists.c
index 9d85e133..ee60f1b2 100644
--- a/src/irc/core/mode-lists.c
+++ b/src/irc/core/mode-lists.c
@@ -31,11 +31,11 @@ static void ban_free(GSList **list, BAN_REC *rec)
g_return_if_fail(list != NULL);
g_return_if_fail(rec != NULL);
+ *list = g_slist_remove(*list, rec);
+
g_free(rec->ban);
g_free_not_null(rec->setby);
g_free(rec);
-
- *list = g_slist_remove(*list, rec);
}
void banlist_free(GSList *banlist)
diff --git a/src/irc/dcc/dcc.c b/src/irc/dcc/dcc.c
index 9a4882e5..44ef3f20 100644
--- a/src/irc/dcc/dcc.c
+++ b/src/irc/dcc/dcc.c
@@ -57,8 +57,8 @@ void dcc_unregister_type(const char *type)
pos = gslist_find_string(dcc_types, type);
if (pos != NULL) {
- g_free(pos->data);
dcc_types = g_slist_remove(dcc_types, pos->data);
+ g_free(pos->data);
}
}
diff --git a/src/irc/flood/flood.c b/src/irc/flood/flood.c
index 320ec5c6..872db941 100644
--- a/src/irc/flood/flood.c
+++ b/src/irc/flood/flood.c
@@ -129,12 +129,12 @@ static void flood_hash_destroy(const char *key, FLOOD_REC *flood)
while (flood->items != NULL) {
FLOOD_ITEM_REC *rec = flood->items->data;
+ flood->items = g_slist_remove(flood->items, rec);
+
g_slist_foreach(rec->msgtimes, (GFunc) g_free, NULL);
g_slist_free(rec->msgtimes);
g_free(rec->target);
g_free(rec);
-
- flood->items = g_slist_remove(flood->items, rec);
}
g_free(flood->nick);