diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2020-08-04 15:57:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 15:57:30 +0000 |
commit | 101011f2f0186774af11f0a708e7e91d43f7ded7 (patch) | |
tree | 3b7659d34a0d44ebc55ef8e1aed49241e62f3637 | |
parent | 684a496bb86022f457a8d34a5c2cfc1b5aab8818 (diff) |
fix_gcc_10_warning: Fix warning when compiled on gcc-10.1 (#9651)
Fix allocation length in ebpf.plugin.
-rw-r--r-- | collectors/ebpf.plugin/ebpf_socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/collectors/ebpf.plugin/ebpf_socket.c b/collectors/ebpf.plugin/ebpf_socket.c index b38d1e8c9c..2d5a1822f6 100644 --- a/collectors/ebpf.plugin/ebpf_socket.c +++ b/collectors/ebpf.plugin/ebpf_socket.c @@ -542,7 +542,7 @@ static inline void fill_resolved_name(netdata_socket_plot_t *ptr, char *hostname ptr->resolved_name = strdupz(hostname); else { length = NETDATA_MAX_NETWORK_COMBINED_LENGTH; - ptr->resolved_name = mallocz(NETDATA_DIM_LENGTH_WITHOUT_SERVICE_PROTOCOL + 1); + ptr->resolved_name = mallocz( NETDATA_MAX_NETWORK_COMBINED_LENGTH + 1); memcpy(ptr->resolved_name, hostname, length); ptr->resolved_name[length] = '\0'; } |