diff options
author | Emmanuel Vasilakis <mrzammler@mm.st> | 2023-06-13 13:02:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 13:02:58 +0300 |
commit | ec4b219da8545ab934e07074f4811fe0cac5ec65 (patch) | |
tree | 5af1d47f4dfa578ce9a12cd4447db5ee315e4810 /streaming/sender.c | |
parent | 6ddc8cfd547dd4509826ce1576f1bd22d427a96a (diff) |
Do strdupz on empty string (#15183)
Diffstat (limited to 'streaming/sender.c')
-rw-r--r-- | streaming/sender.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/streaming/sender.c b/streaming/sender.c index bcdc4f373d..c74c9b407c 100644 --- a/streaming/sender.c +++ b/streaming/sender.c @@ -344,11 +344,11 @@ static inline void rrdpush_sender_thread_close_socket(RRDHOST *host) { void rrdpush_encode_variable(stream_encoded_t *se, RRDHOST *host) { - se->os_name = (host->system_info->host_os_name)?url_encode(host->system_info->host_os_name):""; - se->os_id = (host->system_info->host_os_id)?url_encode(host->system_info->host_os_id):""; - se->os_version = (host->system_info->host_os_version)?url_encode(host->system_info->host_os_version):""; - se->kernel_name = (host->system_info->kernel_name)?url_encode(host->system_info->kernel_name):""; - se->kernel_version = (host->system_info->kernel_version)?url_encode(host->system_info->kernel_version):""; + se->os_name = (host->system_info->host_os_name)?url_encode(host->system_info->host_os_name):strdupz(""); + se->os_id = (host->system_info->host_os_id)?url_encode(host->system_info->host_os_id):strdupz(""); + se->os_version = (host->system_info->host_os_version)?url_encode(host->system_info->host_os_version):strdupz(""); + se->kernel_name = (host->system_info->kernel_name)?url_encode(host->system_info->kernel_name):strdupz(""); + se->kernel_version = (host->system_info->kernel_version)?url_encode(host->system_info->kernel_version):strdupz(""); } void rrdpush_clean_encoded(stream_encoded_t *se) |