From ad5fde59661c1d2d53dcbb23d4327df035d8f192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 22 Dec 2024 19:30:31 +0100 Subject: [PATCH] relay: fix crash after `/upgrade` when relay clients are connected --- CHANGELOG.md | 1 + src/plugins/relay/relay-client.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cac35d98d..9874425b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixed +- relay: fix crash after `/upgrade` when relay clients are connected - api: allow to add empty buffer with function infolist_new_var_buffer - core: fix detection of dl library ([#2218](https://github.com/weechat/weechat/issues/2218)) - logger: fix path displayed when the logs directory can not be created diff --git a/src/plugins/relay/relay-client.c b/src/plugins/relay/relay-client.c index e4975a2f6..53562451c 100644 --- a/src/plugins/relay/relay-client.c +++ b/src/plugins/relay/relay-client.c @@ -1696,6 +1696,11 @@ relay_client_new_with_infolist (struct t_infolist *infolist) new_client->partial_ws_frame_size = ws_frame_size; } } + else + { + new_client->partial_ws_frame = NULL; + new_client->partial_ws_frame_size = 0; + } str = weechat_infolist_string (infolist, "partial_message"); new_client->partial_message = (str) ? strdup (str) : NULL;