diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-11-06 18:17:39 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-11-06 18:17:39 +0100 |
commit | 2f177dd18874a4ae87c1027cc4fbaec3bebbd6e6 (patch) | |
tree | 040fc87bfc717ab47377a07d3a766b93a989c0ad /src/plugins/irc/irc-channel.c | |
parent | edfc415e9e8472b4520d201b14d7ec94734fc8f4 (diff) | |
download | weechat-2f177dd18874a4ae87c1027cc4fbaec3bebbd6e6.zip |
irc: fix join of channels with name longer than 127 chars (closes #1717)
Diffstat (limited to 'src/plugins/irc/irc-channel.c')
-rw-r--r-- | src/plugins/irc/irc-channel.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 36e79c5a5..88c9effbc 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -245,8 +245,8 @@ irc_channel_create_buffer (struct t_irc_server *server, struct t_gui_buffer *ptr_buffer, *ptr_buffer_for_merge; int buffer_created, current_buffer_number, buffer_position; int manual_join, noswitch; - char str_number[32], *channel_name_lower; - const char *buffer_name, *short_name, *localvar_channel; + char str_number[32], *channel_name_lower, *buffer_name; + const char *short_name, *localvar_channel; buffer_created = 0; @@ -294,7 +294,7 @@ irc_channel_create_buffer (struct t_irc_server *server, &irc_input_data_cb, NULL, NULL, &irc_buffer_close_cb, NULL, NULL); if (!ptr_buffer) - return NULL; + goto end; if (weechat_buffer_get_integer (ptr_buffer, "layout_number") < 1) { @@ -432,6 +432,9 @@ irc_channel_create_buffer (struct t_irc_server *server, } } +end: + if (buffer_name) + free (buffer_name); return ptr_buffer; } |