diff options
Diffstat (limited to 'src/plugins/relay')
-rw-r--r-- | src/plugins/relay/relay-auth.c | 6 | ||||
-rw-r--r-- | src/plugins/relay/relay-http.c | 9 | ||||
-rw-r--r-- | src/plugins/relay/relay-info.c | 3 | ||||
-rw-r--r-- | src/plugins/relay/relay-websocket.c | 6 | ||||
-rw-r--r-- | src/plugins/relay/weechat/relay-weechat-msg.c | 6 | ||||
-rw-r--r-- | src/plugins/relay/weechat/relay-weechat-protocol.c | 6 |
6 files changed, 12 insertions, 24 deletions
diff --git a/src/plugins/relay/relay-auth.c b/src/plugins/relay/relay-auth.c index f1d4e0b59..5579b18fb 100644 --- a/src/plugins/relay/relay-auth.c +++ b/src/plugins/relay/relay-auth.c @@ -166,8 +166,7 @@ relay_auth_parse_sha (const char *parameters, if (!argv || (argc < 2)) { /* not enough parameters */ - if (argv) - weechat_string_free_split (argv); + weechat_string_free_split (argv); return; } @@ -240,8 +239,7 @@ relay_auth_parse_pbkdf2 (const char *parameters, if (!argv || (argc < 3)) { /* not enough parameters */ - if (argv) - weechat_string_free_split (argv); + weechat_string_free_split (argv); return; } diff --git a/src/plugins/relay/relay-http.c b/src/plugins/relay/relay-http.c index 0d90ff4bc..6da952cf2 100644 --- a/src/plugins/relay/relay-http.c +++ b/src/plugins/relay/relay-http.c @@ -321,8 +321,7 @@ relay_http_parse_path (const char *path, free (str_path); free (str_params); - if (items_path) - weechat_string_free_split (items_path); + weechat_string_free_split (items_path); } /* @@ -378,8 +377,7 @@ relay_http_parse_method_path (struct t_relay_http_request *request, return 1; error: - if (items) - weechat_string_free_split (items); + weechat_string_free_split (items); request->status = RELAY_HTTP_END; return 0; } @@ -1335,8 +1333,7 @@ relay_http_request_free (struct t_relay_http_request *request) weechat_string_dyn_free (request->raw, 1); free (request->method); free (request->path); - if (request->path_items) - weechat_string_free_split (request->path_items); + weechat_string_free_split (request->path_items); weechat_hashtable_free (request->params); free (request->http_version); weechat_hashtable_free (request->headers); diff --git a/src/plugins/relay/relay-info.c b/src/plugins/relay/relay-info.c index 18322ffbf..b068f0b9e 100644 --- a/src/plugins/relay/relay-info.c +++ b/src/plugins/relay/relay-info.c @@ -106,8 +106,7 @@ relay_info_info_relay_client_count_cb (const void *pointer, void *data, ptr_count = str_count; end: - if (items) - weechat_string_free_split (items); + weechat_string_free_split (items); return (ptr_count) ? strdup (ptr_count) : NULL; } diff --git a/src/plugins/relay/relay-websocket.c b/src/plugins/relay/relay-websocket.c index bd9aceb1c..7da984adb 100644 --- a/src/plugins/relay/relay-websocket.c +++ b/src/plugins/relay/relay-websocket.c @@ -361,12 +361,10 @@ relay_websocket_parse_extensions (const char *extensions, ws_deflate->window_bits_inflate = (int)number; } } - if (items) - weechat_string_free_split (items); + weechat_string_free_split (items); } } - if (params) - weechat_string_free_split (params); + weechat_string_free_split (params); } weechat_string_free_split (exts); diff --git a/src/plugins/relay/weechat/relay-weechat-msg.c b/src/plugins/relay/weechat/relay-weechat-msg.c index 7514e3f5a..9f2dfa23e 100644 --- a/src/plugins/relay/weechat/relay-weechat-msg.c +++ b/src/plugins/relay/weechat/relay-weechat-msg.c @@ -768,11 +768,9 @@ relay_weechat_msg_add_hdata (struct t_relay_weechat_msg *msg, rc = 1; end: - if (list_keys) - weechat_string_free_split (list_keys); + weechat_string_free_split (list_keys); free (keys_types); - if (list_path) - weechat_string_free_split (list_path); + weechat_string_free_split (list_path); free (path_returned); free (hdata_head); diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c index 1d5d772e6..d2b3e144c 100644 --- a/src/plugins/relay/weechat/relay-weechat-protocol.c +++ b/src/plugins/relay/weechat/relay-weechat-protocol.c @@ -1839,8 +1839,6 @@ end: free (data_unescaped); free (id); free (command); - if (argv) - weechat_string_free_split (argv); - if (argv_eol) - weechat_string_free_split (argv_eol); + weechat_string_free_split (argv); + weechat_string_free_split (argv_eol); } |