summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2017-10-21 17:38:06 +0200
committerLemonBoy <thatlemon@gmail.com>2018-01-07 12:36:19 +0100
commitcfc8c9f8e2d982ee3ebff7afa1d1bdeb04003029 (patch)
tree3fb95e5bbf5292240c6b5f02d202e672b6616184 /src/irc
parentf4d811ddf51ce03e90e0417a6c25baeb9aa48353 (diff)
downloadirssi-cfc8c9f8e2d982ee3ebff7afa1d1bdeb04003029.zip
Properly dispose the GSList chains
We forgot to free the link and the data, oops.
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/core/irc-cap.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/irc/core/irc-cap.c b/src/irc/core/irc-cap.c
index 2378d640..a5ae07aa 100644
--- a/src/irc/core/irc-cap.c
+++ b/src/irc/core/irc-cap.c
@@ -36,7 +36,7 @@ int cap_toggle (IRC_SERVER_REC *server, char *cap, int enable)
return TRUE;
}
else if (!enable && gslist_find_string(server->cap_queue, cap)) {
- server->cap_queue = gslist_remove_string(server->cap_queue, cap);
+ server->cap_queue = gslist_delete_string(server->cap_queue, cap, g_free);
return TRUE;
}
@@ -135,8 +135,6 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
return;
}
- g_warning("%s -> %s", evt, list);
-
/* Strip the trailing whitespaces before splitting the string, some servers send responses with
* superfluous whitespaces that g_strsplit the interprets as tokens */
caps = g_strsplit(g_strchomp(list), " ", -1);
@@ -214,7 +212,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
disable = (*caps[i] == '-');
if (disable)
- server->cap_active = gslist_remove_string(server->cap_active, caps[i] + 1);
+ server->cap_active = gslist_delete_string(server->cap_active, caps[i] + 1, g_free);
else
server->cap_active = g_slist_prepend(server->cap_active, g_strdup(caps[i]));
@@ -265,7 +263,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
cap_emit_signal(server, "delete", key);
/* The server removed this CAP, remove it from the list
* of the active ones if we had requested it */
- server->cap_active = gslist_remove_string(server->cap_active, key);
+ server->cap_active = gslist_delete_string(server->cap_active, key, g_free);
}
}
else {