mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Merge branch 'fix-double-cap' into 'master'
fix use after free receiving caps See merge request irssi/irssi!35
This commit is contained in:
commit
401fff7c34
@ -169,7 +169,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
* duplicated values, let's just warn the user */
|
||||
g_warning("The server sent the %s capability twice", key);
|
||||
}
|
||||
g_hash_table_insert(server->cap_supported, key, val);
|
||||
g_hash_table_replace(server->cap_supported, key, val);
|
||||
}
|
||||
|
||||
/* A multiline response is always terminated by a normal one,
|
||||
@ -255,7 +255,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
continue;
|
||||
}
|
||||
|
||||
g_hash_table_insert(server->cap_supported, key, val);
|
||||
g_hash_table_replace(server->cap_supported, key, val);
|
||||
cap_emit_signal(server, "new", key);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user