mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 04:46:37 +02:00
relay: free frames only if they were allocated by function relay_websocket_decode_frame
This commit is contained in:
@@ -663,12 +663,15 @@ relay_client_recv_buffer (struct t_relay_client *client,
|
||||
if (!rc)
|
||||
{
|
||||
/* fatal error when decoding frame: close connection */
|
||||
for (i = 0; i < num_frames; i++)
|
||||
if (frames)
|
||||
{
|
||||
if (frames[i].payload)
|
||||
free (frames[i].payload);
|
||||
for (i = 0; i < num_frames; i++)
|
||||
{
|
||||
if (frames[i].payload)
|
||||
free (frames[i].payload);
|
||||
}
|
||||
free (frames);
|
||||
}
|
||||
free (frames);
|
||||
weechat_printf_date_tags (
|
||||
NULL, 0, "relay_client",
|
||||
_("%s%s: error decoding websocket frame for client "
|
||||
|
||||
Reference in New Issue
Block a user