[collectd-changes] collectd, the system statistics collection daemon: Changes to 'collectd-5.7'
Florian Forster
octo at verplant.org
Tue May 16 19:39:24 CEST 2017
src/collectd.conf.pod | 8 +--
src/curl_json.c | 173 +++++++++++++++++++++++++------------------------
src/perl.c | 56 +++++++++-------
3 files changed, 126 insertions(+), 111 deletions(-)
New commits:
commit fbaf81a04c23d51947d94a5c7d9142290dff07bc
Merge: 4362530 8a2be90
Author: Florian Forster <octo at collectd.org>
Date: Tue May 16 19:34:25 2017 +0200
Merge branch 'collectd-5.6' into collectd-5.7
commit 8a2be9037587c1b80a00ddb1d7d396d1d48ec37d
Author: Florian Forster <octo at collectd.org>
Date: Mon May 15 14:40:26 2017 +0200
curl_json plugin: Fix array index and key handling.
Previously, the "key" was loaded by calling cj_cb_map_key() from
cj_cb_inc_array_index(). That means that the key for the previous element
was loaded as the array index was updated for the next element, resulting
in an off-by-one error. Also the key was not unset in time, resulting in
two metrics with the same identifier being created.
This patch fixes this with the following changes:
* cj_advance_array() (nee cj_cb_inc_array_index()) now loads the key for
the new index position instead of the previous one.
* The initial "0" key is loaded from cj_cb_start_array().
* cj_advance_array() always updates the key. The "update_key" argument
has been removed.
* Refactoring: key loading has been moved out of cj_cb_map_key() and
into its own function, cj_load_key().
Unit tests are in a separate commit for easier cherry-picking.
Fixes: #2266
commit b40f741f7f4c0f20d4ec6ad331ab242e81d9f76c
Author: Florian Forster <octo at collectd.org>
Date: Mon May 15 08:14:03 2017 +0200
collectd.conf(5): Fix typo ("queries" vs. "queried").
By avoiding the word: "metrics" is bettern than "statistics".
commit 7d6d77abad82af9b9c7df77948af345e3b7755fc
Merge: c3e2a69 867e977
Author: Ruben Kerkhof <ruben at rubenkerkhof.com>
Date: Sun May 14 12:38:58 2017 +0200
Merge pull request #2278 from octo/ff/perl
perl plugin: Fix potential double-free.
commit 867e977f14bdb55dd2c727a8b9b5f6aaac41e558
Author: Florian Forster <octo at collectd.org>
Date: Sun May 14 08:24:51 2017 +0200
perl plugin: Fix potential double-free.
The av2notification_meta() function updated it's parameter by doing
(*m) = malloc();
Afterwards, if an error occurred, it would call `free(*m);` and (potentially)
return, leaving an invalid pointer stored in `m`. The caller would then try to
free the returned pointer because it was non-NULL.
This patch fixes this by doing several code cleanups:
* The meta argument is not updated unnecessarily. Instead, a local variable
is allocated and used within the loop and only on success is the return
pointer updated.
* Introduce additional local variables instead of re-using the `tmp` variable
multiple times.
* Name the variable pointing to the end of the linked list appropriately
`tail` and remove one level of indirection. Reading code that is using
pointers to pointers is unnecessarily hard.
More information about the collectd-changes
mailing list