mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Prevent a memory leak
When a CAP DEL is received the key/val pair is not stored in the hashtable at all so just free them when we're done.
This commit is contained in:
parent
74409aa850
commit
cd107deb46
1 changed files with 4 additions and 0 deletions
|
|
@ -266,6 +266,10 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
|||
/* The server removed this CAP, remove it from the list
|
||||
* of the active ones if we had requested it */
|
||||
server->cap_active = gslist_delete_string(server->cap_active, key, g_free);
|
||||
/* We don't transfer the ownership of those two
|
||||
* variables this time, just free them when we're done. */
|
||||
g_free(key);
|
||||
g_free(val);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue