diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-25 19:59:56 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-26 21:22:49 +0200 |
commit | ba97a395657ab2438965f32eed788479ed48ff8f (patch) | |
tree | b294a07830f79fec95eafc87a585c3539bece72e /src | |
parent | 42cba254532074127bc3e99a9af13cab64143f3d (diff) | |
download | weechat-ba97a395657ab2438965f32eed788479ed48ff8f.zip |
relay: remove check of NULL pointers before calling relay_http_response_free() (issue #865)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/relay/api/remote/relay-remote-network.c | 3 | ||||
-rw-r--r-- | src/plugins/relay/relay-http.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/relay/api/remote/relay-remote-network.c b/src/plugins/relay/api/remote/relay-remote-network.c index 3e9fbd583..0a0b8ed6a 100644 --- a/src/plugins/relay/api/remote/relay-remote-network.c +++ b/src/plugins/relay/api/remote/relay-remote-network.c @@ -227,8 +227,7 @@ error: (msg_resp_error) ? " (" : "", (msg_resp_error) ? msg_resp_error : "", (msg_resp_error) ? ")" : ""); - if (http_resp) - relay_http_response_free (http_resp); + relay_http_response_free (http_resp); return 0; } diff --git a/src/plugins/relay/relay-http.c b/src/plugins/relay/relay-http.c index 62dfb839c..aff6a1ac7 100644 --- a/src/plugins/relay/relay-http.c +++ b/src/plugins/relay/relay-http.c @@ -1579,6 +1579,9 @@ relay_http_parse_response (const char *data) void relay_http_response_free (struct t_relay_http_response *response) { + if (!response) + return; + free (response->http_version); free (response->message); weechat_hashtable_free (response->headers); |