src/utils_latency.c: Store "bin_width" as cdtime_t.
This solves the integer overflow when passing huge latency values to
latency_counter_add(). In addition to fixing the overflow the function
will now ignore values that are larger than LLONG_MAX, i.e. the longest
possible latency is 272 years. As a nice side-effect, the precission of
latency_counter_get_percentile() is improved.
Issue: #1131
This solves the integer overflow when passing huge latency values to
latency_counter_add(). In addition to fixing the overflow the function
will now ignore values that are larger than LLONG_MAX, i.e. the longest
possible latency is 272 years. As a nice side-effect, the precission of
latency_counter_get_percentile() is improved.
Issue: #1131
src/utils_latency.c: Fix change_bin_width().
A missing cast when calculating "width_change_ratio" caused all metrics to
be moved to bucket #0.
A missing cast when calculating "width_change_ratio" caused all metrics to
be moved to bucket #0.
varnish: fix leak on read
Since VSM_Close doesn't free the object we leak a few bytes
every interval
Since VSM_Close doesn't free the object we leak a few bytes
every interval
openvpn plugin: Fix "Dead assignment" warning.
modbus plugin: Make sure variable is initialized.
This was introduced by the merge
(09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b).
This was introduced by the merge
(09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b).
tail plugin: Make sure variable is initialized.
This was introduced by the merge
(09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b).
This was introduced by the merge
(09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b).
Fix header condition
The dependency is either UTMPX or UTMP or Statgrab. The inclusion above hasn't statgrab.h in the elif-chain, that means compilation fails when only libstatgrab is available. The line can safely be taken out as the same condition is checked in #L120.
The dependency is either UTMPX or UTMP or Statgrab. The inclusion above hasn't statgrab.h in the elif-chain, that means compilation fails when only libstatgrab is available. The line can safely be taken out as the same condition is checked in #L120.
Fixed rrdtool sigsegv (datadir==NULL ptr dereferencing)
processes: correct a typo
perl: unlock mutex on error
CID 37970
CID 37970
openvpn: free resource on error
openvpn: fix error message
openvpn: check return value of malloc
CID 37987
CID 37987
curl_json: remove dead code
CID 37963
CID 37963
snmp plugin: don't read from uninitialized pointer
if the first snmp_pdu_create inside the loop returns an error,
we exit the loop with res uninitialized and then call snmp_free_pdu on it.
CID #38037
if the first snmp_pdu_create inside the loop returns an error,
we exit the loop with res uninitialized and then call snmp_free_pdu on it.
CID #38037
libcollectdclient: don't close socket twice
CID #38039
CID #38039
email plugin: fix check for result of malloc
CID #38010
CID #38010
collectd.conf.pod: mention IPv6 option to the iptables plugin
Thanks to @michaelsalmon for pointing this out !
Fix #1496
Thanks to @michaelsalmon for pointing this out !
Fix #1496
remove the addressof in the sizeof
quick fix for issue 1501?
the new warning for pointer access introduced in gcc 4.8 helped to find
this one.
quick fix for issue 1501?
the new warning for pointer access introduced in gcc 4.8 helped to find
this one.
perl plugin: Check "return value" of PERL_GET_CONTEXT.
CID: 37985
CID: 37985
email plugin: Don't call type_list_incr() with type == NULL.
CID: 37988
CID: 37988
gmond plugin: Inline the plugin_dispatch_values() call.
Since version 5.3, a write queue is used. This means that the
plugin_dispatch_values() call will create a copy of the value list and
return quickly. Creating yet another copy here is therefore not as useful
anymore.
CID: 38114
Since version 5.3, a write queue is used. This means that the
plugin_dispatch_values() call will create a copy of the value list and
return quickly. Creating yet another copy here is therefore not as useful
anymore.
CID: 38114
gmond plugin: Check return value of sendto(2).
CID: 38113
CID: 38113
gmond plugin: Check return value of setsockopt(2).
CID: 38112
CID: 38112
configure.ac: warn when pkg-config is not installed
It hasn't been optional for a while now.
Fixes:
checking for rrd.h... no
./configure: 25157: Syntax error: word unexpected (expecting ")")
Signed-off-by: Florian Forster <octo@collectd.org>
It hasn't been optional for a while now.
Fixes:
checking for rrd.h... no
./configure: 25157: Syntax error: word unexpected (expecting ")")
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_ignorelist.c: Refactoring / code style fixes.
One of the goals was to remove uses of smalloc().
One of the goals was to remove uses of smalloc().
swap plugin: don't exit when malloc fails
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
curl_json plugin: Rewrite logic to add a path to db->tree.
CID: 37991
CID: 37991
curl_xml plugin: Correctly free xpath object.
CID: 37993
Signed-off-by: Florian Forster <octo@collectd.org>
CID: 37993
Signed-off-by: Florian Forster <octo@collectd.org>
ping plugin: Protect access to ping_thread_error.
This is primarily to make Coverity happy.
CID: 37976
This is primarily to make Coverity happy.
CID: 37976
ping plugin: Remove "static" from local variable.
This caused Coverity to see concurrency issues where there are none.
CID: 37934
This caused Coverity to see concurrency issues where there are none.
CID: 37934
rrdtool plugin: Improve handling of the "DataDir" option.
CID: 37977
CID: 37977
python plugin: Check return value of cpy_unicode_or_bytes_to_string().
CID: 37984
CID: 37984
python plugin: Check return value of malloc().
CID: 37981, 37982, 37983
CID: 37981, 37982, 37983
python plugin: Fix memory leak.
The regiser_read / register_write functions assume a user_data_t*
pointing to static memory and will not store / free the pointer.
CID: 38002
The regiser_read / register_write functions assume a user_data_t*
pointing to static memory and will not store / free the pointer.
CID: 38002
tail plugin: Fix memory leak.
CID: 38013
CID: 38013
postgresql plugin: Register a new user data pointer with udb_query_set_user_data() unconditionally.
CID: 38019
CID: 38019
email plugin: Refactor the accept() loop.
This removes the assumption that accept() returning a socket (success)
implies that errno is not equal to EINTR. This is probably a reasonable
assumption, but trips up Coverity may be a bit hard to read.
CID: 38009
This removes the assumption that accept() returning a socket (success)
implies that errno is not equal to EINTR. This is probably a reasonable
assumption, but trips up Coverity may be a bit hard to read.
CID: 38009
email plugin: Free "connection" in error handling.
CID: 38010
CID: 38010
postgresql plugin: Remove invalid free().
CID: 37936
CID: 37936
src/collectd-tg.c: Explicitly null-terminate string.
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_format_json.c: Make sure "keys" is freed in all error paths.
CID: 38008
CID: 38008
sigrok plugin: don't pass status to strerror
CID #38120
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38120
Signed-off-by: Florian Forster <octo@collectd.org>
multimeter plugin: Initizliaze "struct termios".
CID: 38036
CID: 38036
configure.ac: fix previous change to detect libjvm
This worked on OSX but failed on Linux.
Signed-off-by: Florian Forster <octo@collectd.org>
This worked on OSX but failed on Linux.
Signed-off-by: Florian Forster <octo@collectd.org>
meta_data.c: check return value of md_entry_alloc
CID #37986
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37986
Signed-off-by: Florian Forster <octo@collectd.org>
iptables plugin: remove dead code
ip version is either IPv4 or IPv6
CID #37962
Signed-off-by: Florian Forster <octo@collectd.org>
ip version is either IPv4 or IPv6
CID #37962
Signed-off-by: Florian Forster <octo@collectd.org>
src/filter_chain.c: Refactor fc_process_chain() a wee bit.
src/filter_chain.c: Delete dead code.
CID: 37961
CID: 37961
src/common.c: Check arguments of parse_values().
CID: 37965
CID: 37965
libcollectdclient: Check return value of setsockopt().
Coverity CID 37944.
Signed-off-by: Florian Forster <octo@collectd.org>
Coverity CID 37944.
Signed-off-by: Florian Forster <octo@collectd.org>
configure.ac: fix libjvm detection on OSX
Shared libraries have the extension .dylib instead of .so
Ideally we look at shrext_cmds from libtool to find the shared library
extension but this works too.
Signed-off-by: Florian Forster <octo@collectd.org>
Shared libraries have the extension .dylib instead of .so
Ideally we look at shrext_cmds from libtool to find the shared library
extension but this works too.
Signed-off-by: Florian Forster <octo@collectd.org>
unixsock: check return value of chmod
CID #37948
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37948
Signed-off-by: Florian Forster <octo@collectd.org>
bind plugin: plug small leak
CID #37992
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37992
Signed-off-by: Florian Forster <octo@collectd.org>
curl_xml plugin: plug a few leaks on error
CID #37993
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37993
Signed-off-by: Florian Forster <octo@collectd.org>
stats plugin: close fd on error
CID #37995
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37995
Signed-off-by: Florian Forster <octo@collectd.org>
utils_cache.c: plug leak on error
CID #38000
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38000
Signed-off-by: Florian Forster <octo@collectd.org>
Aggregration plugin: plug leak on error
CID #38005
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38005
Signed-off-by: Florian Forster <octo@collectd.org>
varnish plugin: fix two resource leaks on error
CID #42774
Signed-off-by: Florian Forster <octo@collectd.org>
CID #42774
Signed-off-by: Florian Forster <octo@collectd.org>
libcollectdclient: free result of getaddrinfo
CID #37997
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37997
Signed-off-by: Florian Forster <octo@collectd.org>
madwifi: make code a little bit clearer
buf2 is initialized to zero, readlink
will write at most sizeof(buf2) -1 bytes,
so the trailing null should not be overwritten.
Coverity doesn't see that, rewrite the code
differently so it does.
CID #38027
Signed-off-by: Florian Forster <octo@collectd.org>
buf2 is initialized to zero, readlink
will write at most sizeof(buf2) -1 bytes,
so the trailing null should not be overwritten.
Coverity doesn't see that, rewrite the code
differently so it does.
CID #38027
Signed-off-by: Florian Forster <octo@collectd.org>
Pinba plugin: close fd on error
CID #38001
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38001
Signed-off-by: Florian Forster <octo@collectd.org>
configfile.c: close dir on error
CID #38006
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38006
Signed-off-by: Florian Forster <octo@collectd.org>
utils_fbhash.c: fix resource leak on error
CID #38014
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38014
Signed-off-by: Florian Forster <octo@collectd.org>
multimeter plugin: fix fd leak
If open returns 0 we leak fd.
CID #38016
Signed-off-by: Florian Forster <octo@collectd.org>
If open returns 0 we leak fd.
CID #38016
Signed-off-by: Florian Forster <octo@collectd.org>
postgresql plugin: don't exit on malloc failure
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
perl: Check for NULL before dereferencing
CID #38023
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38023
Signed-off-by: Florian Forster <octo@collectd.org>
table plugin: fix check for realloc
We were checking the wrong thing.
CID #38024
Signed-off-by: Florian Forster <octo@collectd.org>
We were checking the wrong thing.
CID #38024
Signed-off-by: Florian Forster <octo@collectd.org>
utils_mount.c: check for null before dereferencing
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
teamspeak2: fix potential use after close
If connecting to the last host fails, we exit the loop
with a closed fd, which we try to fdopen() later on.
CID #38038
Signed-off-by: Florian Forster <octo@collectd.org>
If connecting to the last host fails, we exit the loop
with a closed fd, which we try to fdopen() later on.
CID #38038
Signed-off-by: Florian Forster <octo@collectd.org>
threshold plugin: Register callbacks only once.
Fixes: #551
Signed-off-by: Florian Forster <octo@collectd.org>
Fixes: #551
Signed-off-by: Florian Forster <octo@collectd.org>
df plugin: Fix the duplicate detection.
Not that multiple devices could be mounted at the same mount point ... I think.
Fixes: #1402
Not that multiple devices could be mounted at the same mount point ... I think.
Fixes: #1402
df plugin: skip duplicate entries, fixes "uc_update: Value too old" error
Issue: #1402
Issue: #1402
vmem plugin: Fix pgsteal for newer Linux kernels.
Fixes: #1307
Fixes: #1307
Link collectd-tg with pthreads
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
irq plugin: close file descriptor on failure
CID 38018
CID 38018
modbus plugin: fix 2 leaks on error paths
filecount plugin: fix leak on error path
bind: tmp doesn't point to start of allocated memory
amqp: use the right buffer size for sstrncpy
buffer is a char *, not an array, so size_of returns the size
of the pointer.
buffer is a char *, not an array, so size_of returns the size
of the pointer.
powerdns plugin: fix array initialization
Fix build with older version of libprotobuf-c
gcrypt: take search path into account
gcrypt: remove exec-prefix check
libgcrypt-config --libs already includes the correct library include path.
Also, we hardcoded it to $exec-prefix/lib, which is just plain wrong on
64bit architectures.
libgcrypt-config --libs already includes the correct library include path.
Also, we hardcoded it to $exec-prefix/lib, which is just plain wrong on
64bit architectures.
protoc: check for headers in new location as well
Newer versions of protobuf-c have their headers in
/usr/include/protobuf-c, and a symlink from
/usr/include/google/protobuf-c/.
These symlinks will eventually disappear however, so be prepared.
Newer versions of protobuf-c have their headers in
/usr/include/protobuf-c, and a symlink from
/usr/include/google/protobuf-c/.
These symlinks will eventually disappear however, so be prepared.
protoc: check for libprotobuf-c as well
protoc: simplify configure check
protoc: slightly nicer output in silent mode
make[1]: Entering directory '/home/ruben/src/collectd/src'
PROTOC-C pinba.pb-c.c
PROTOC-C riemann.pb-c.c
make[1]: Entering directory '/home/ruben/src/collectd/src'
PROTOC-C pinba.pb-c.c
PROTOC-C riemann.pb-c.c
protoc: log when compiler is missing
In the case where we do have the required headers
but don't have the compiler, this makes it more clear
that we're missing the latter.
In the case where we do have the required headers
but don't have the compiler, this makes it more clear
that we're missing the latter.
Silence protoc-c in silence mode
Instead of showing the full command line, this shows:
GEN pinba.pb-c.c
GEN riemann.pb-c.c
Instead of showing the full command line, this shows:
GEN pinba.pb-c.c
GEN riemann.pb-c.c
write_riemann: only compile .proto files when enabled
If the write_riemann plugin is not enabled there's no
need to compile the protobuf files.
If the write_riemann plugin is not enabled there's no
need to compile the protobuf files.
Pinba: only compile .proto files when enabled
If the pinba plugin is not enabled there's no
need to compile the protobuf files.
If the pinba plugin is not enabled there's no
need to compile the protobuf files.
utils_mount: use reentrant getmntent_r when we can
Fixes #1162
Fixes #1162
ntp plugin: Unify casting to gauge_t.
Also add note about STA_NANO.
Issue: #1314.
Also add note about STA_NANO.
Issue: #1314.
Fix NTP kerninfo offset/estimated error scaling
cpu plugin: Improve error message for host_processors() failing.
Issue: #22
Issue: #22
rrdtool: unlock mutex on error
CID 37972
Signed-off-by: Florian Forster <octo@collectd.org>
CID 37972
Signed-off-by: Florian Forster <octo@collectd.org>
csv plugin: plug memory leak on error
CID 38015
Signed-off-by: Florian Forster <octo@collectd.org>
CID 38015
Signed-off-by: Florian Forster <octo@collectd.org>
rrdtool: release another lock on error
CID 37973
Signed-off-by: Florian Forster <octo@collectd.org>
CID 37973
Signed-off-by: Florian Forster <octo@collectd.org>
the swrite interface is 'non-zero'
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>