diff options
author | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2019-02-20 18:56:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 18:56:57 +0100 |
commit | 8a0ce020550567e022b322a4199b1f1e1d6af90c (patch) | |
tree | 72589745422b1c5fe34a78bb35e007386459ea6f /collectors/proc.plugin | |
parent | 5557b82d3feee6f4bf99b88d547eac0353ce0cda (diff) |
cpuidle handle newlines in names (#5425)
* Fix issue #5418
* Use trim to take out new line
Diffstat (limited to 'collectors/proc.plugin')
-rw-r--r-- | collectors/proc.plugin/proc_stat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/collectors/proc.plugin/proc_stat.c b/collectors/proc.plugin/proc_stat.c index f345a39d67..ad893456b1 100644 --- a/collectors/proc.plugin/proc_stat.c +++ b/collectors/proc.plugin/proc_stat.c @@ -427,7 +427,7 @@ static int read_cpuidle_states(char *cpuidle_name_filename , char *cpuidle_time_ } name_buf[r - 1] = '\0'; // erase extra character - cc->cpuidle_state[state].name = strdupz(name_buf); + cc->cpuidle_state[state].name = strdupz(trim(name_buf)); close(fd); snprintfz(filename, FILENAME_MAX, cpuidle_time_filename, core, state); |