summaryrefslogtreecommitdiff
path: root/src/plugins/relay/relay-client.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-04-25 00:21:54 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-04-26 08:41:44 +0200
commit529a22e342e9195bd0173877e707d74397f55d96 (patch)
tree56c6fb9d00bf630b8f78f978ab36af1240da3853 /src/plugins/relay/relay-client.c
parent828ca37225bcff10d349cd1c65c50417a5e07f0f (diff)
downloadweechat-529a22e342e9195bd0173877e707d74397f55d96.zip
plugins: remove check of NULL pointers before calling weechat_unhook() (issue #865)
Diffstat (limited to 'src/plugins/relay/relay-client.c')
-rw-r--r--src/plugins/relay/relay-client.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/relay/relay-client.c b/src/plugins/relay/relay-client.c
index cc22be83c..f073f180c 100644
--- a/src/plugins/relay/relay-client.c
+++ b/src/plugins/relay/relay-client.c
@@ -1906,14 +1906,11 @@ relay_client_free (struct t_relay_client *client)
free (client->protocol_string);
free (client->protocol_args);
free (client->nonce);
- if (client->hook_timer_handshake)
- weechat_unhook (client->hook_timer_handshake);
+ weechat_unhook (client->hook_timer_handshake);
relay_websocket_deflate_free (client->ws_deflate);
relay_http_request_free (client->http_req);
- if (client->hook_fd)
- weechat_unhook (client->hook_fd);
- if (client->hook_timer_send)
- weechat_unhook (client->hook_timer_send);
+ weechat_unhook (client->hook_fd);
+ weechat_unhook (client->hook_timer_send);
free (client->partial_ws_frame);
free (client->partial_message);
if (client->protocol_data)