Skip to content

Commit

Permalink
relay: check that parameter ws_deflate is not NULL in function relay_…
Browse files Browse the repository at this point in the history
…websocket_deflate_free (issue #2066)
  • Loading branch information
flashcode committed Apr 7, 2024
1 parent 90b855e commit a3f3c9d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/plugins/relay/relay-websocket.c
Expand Up @@ -143,9 +143,12 @@ relay_websocket_deflate_free_stream_inflate (struct t_relay_websocket_deflate *w
void
relay_websocket_deflate_free (struct t_relay_websocket_deflate *ws_deflate)
{
relay_websocket_deflate_free_stream_deflate (ws_deflate);
relay_websocket_deflate_free_stream_inflate (ws_deflate);
free (ws_deflate);
if (ws_deflate)
{
relay_websocket_deflate_free_stream_deflate (ws_deflate);
relay_websocket_deflate_free_stream_inflate (ws_deflate);
free (ws_deflate);
}
}

/*
Expand Down

0 comments on commit a3f3c9d

Please sign in to comment.