Florian Forster [Tue, 8 Dec 2015 12:14:47 +0000 (13:14 +0100)]
tail plugin: Fix memory leak.
CID: 38013
Florian Forster [Tue, 8 Dec 2015 12:07:26 +0000 (13:07 +0100)]
postgresql plugin: Register a new user data pointer with udb_query_set_user_data() unconditionally.
CID: 38019
Florian Forster [Tue, 8 Dec 2015 11:51:29 +0000 (12:51 +0100)]
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
Florian Forster [Tue, 8 Dec 2015 10:56:09 +0000 (11:56 +0100)]
email plugin: Free "connection" in error handling.
CID: 38010
Florian Forster [Tue, 8 Dec 2015 10:49:56 +0000 (11:49 +0100)]
postgresql plugin: Remove invalid free().
CID: 37936
Florian Forster [Tue, 8 Dec 2015 10:46:09 +0000 (11:46 +0100)]
src/collectd-tg.c: Explicitly null-terminate string.
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
Florian Forster [Tue, 8 Dec 2015 10:30:13 +0000 (11:30 +0100)]
src/utils_format_json.c: Make sure "keys" is freed in all error paths.
CID: 38008
Ruben Kerkhof [Sun, 6 Dec 2015 11:09:20 +0000 (12:09 +0100)]
sigrok plugin: don't pass status to strerror
CID #38120
Signed-off-by: Florian Forster <octo@collectd.org>
Florian Forster [Sat, 5 Dec 2015 22:37:16 +0000 (23:37 +0100)]
multimeter plugin: Initizliaze "struct termios".
CID: 38036
Ruben Kerkhof [Sat, 5 Dec 2015 21:17:43 +0000 (22:17 +0100)]
configure.ac: fix previous change to detect libjvm
This worked on OSX but failed on Linux.
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 5 Dec 2015 13:20:29 +0000 (14:20 +0100)]
meta_data.c: check return value of md_entry_alloc
CID #37986
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 5 Dec 2015 14:07:40 +0000 (15:07 +0100)]
iptables plugin: remove dead code
ip version is either IPv4 or IPv6
CID #37962
Signed-off-by: Florian Forster <octo@collectd.org>
Florian Forster [Sat, 5 Dec 2015 21:49:05 +0000 (22:49 +0100)]
src/filter_chain.c: Refactor fc_process_chain() a wee bit.
Florian Forster [Sat, 5 Dec 2015 21:48:18 +0000 (22:48 +0100)]
src/filter_chain.c: Delete dead code.
CID: 37961
Florian Forster [Sat, 5 Dec 2015 21:30:39 +0000 (22:30 +0100)]
src/common.c: Check arguments of parse_values().
CID: 37965
Florian Forster [Sat, 5 Dec 2015 21:23:05 +0000 (22:23 +0100)]
libcollectdclient: Check return value of setsockopt().
Coverity CID 37944.
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 5 Dec 2015 14:50:46 +0000 (15:50 +0100)]
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>
Ruben Kerkhof [Sat, 5 Dec 2015 14:16:36 +0000 (15:16 +0100)]
unixsock: check return value of chmod
CID #37948
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 5 Dec 2015 13:09:12 +0000 (14:09 +0100)]
bind plugin: plug small leak
CID #37992
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 5 Dec 2015 13:03:58 +0000 (14:03 +0100)]
curl_xml plugin: plug a few leaks on error
CID #37993
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 5 Dec 2015 12:42:33 +0000 (13:42 +0100)]
stats plugin: close fd on error
CID #37995
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 5 Dec 2015 12:39:03 +0000 (13:39 +0100)]
utils_cache.c: plug leak on error
CID #38000
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 5 Dec 2015 12:33:54 +0000 (13:33 +0100)]
Aggregration plugin: plug leak on error
CID #38005
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 5 Dec 2015 12:21:25 +0000 (13:21 +0100)]
varnish plugin: fix two resource leaks on error
CID #42774
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 5 Dec 2015 11:09:00 +0000 (12:09 +0100)]
libcollectdclient: free result of getaddrinfo
CID #37997
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 4 Dec 2015 20:03:44 +0000 (21:03 +0100)]
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>
Ruben Kerkhof [Fri, 4 Dec 2015 22:21:31 +0000 (23:21 +0100)]
Pinba plugin: close fd on error
CID #38001
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 4 Dec 2015 22:14:06 +0000 (23:14 +0100)]
configfile.c: close dir on error
CID #38006
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 4 Dec 2015 21:02:29 +0000 (22:02 +0100)]
utils_fbhash.c: fix resource leak on error
CID #38014
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 4 Dec 2015 20:56:40 +0000 (21:56 +0100)]
multimeter plugin: fix fd leak
If open returns 0 we leak fd.
CID #38016
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 4 Dec 2015 20:40:16 +0000 (21:40 +0100)]
postgresql plugin: don't exit on malloc failure
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 4 Dec 2015 20:30:14 +0000 (21:30 +0100)]
perl: Check for NULL before dereferencing
CID #38023
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 4 Dec 2015 20:22:42 +0000 (21:22 +0100)]
table plugin: fix check for realloc
We were checking the wrong thing.
CID #38024
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 4 Dec 2015 20:18:27 +0000 (21:18 +0100)]
utils_mount.c: check for null before dereferencing
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 4 Dec 2015 18:09:28 +0000 (19:09 +0100)]
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>
Michael Salmon [Thu, 16 Jul 2015 07:05:54 +0000 (09:05 +0200)]
threshold plugin: Register callbacks only once.
Fixes: #551
Signed-off-by: Florian Forster <octo@collectd.org>
Florian Forster [Fri, 4 Dec 2015 16:18:24 +0000 (17:18 +0100)]
df plugin: Fix the duplicate detection.
Not that multiple devices could be mounted at the same mount point ... I think.
Fixes: #1402
Stefan Brüns [Mon, 1 Aug 2011 11:50:52 +0000 (11:50 +0000)]
df plugin: skip duplicate entries, fixes "uc_update: Value too old" error
Issue: #1402
Jakub Jankowski [Thu, 15 Oct 2015 23:30:33 +0000 (23:30 +0000)]
vmem plugin: Fix pgsteal for newer Linux kernels.
Fixes: #1307
Manuel Luis Sanmartín Rozada [Sat, 8 Feb 2014 20:30:21 +0000 (21:30 +0100)]
Link collectd-tg with pthreads
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 28 Nov 2015 22:17:59 +0000 (23:17 +0100)]
irq plugin: close file descriptor on failure
CID 38018
Ruben Kerkhof [Sat, 28 Nov 2015 22:07:31 +0000 (23:07 +0100)]
modbus plugin: fix 2 leaks on error paths
Ruben Kerkhof [Sat, 28 Nov 2015 22:13:01 +0000 (23:13 +0100)]
filecount plugin: fix leak on error path
Ruben Kerkhof [Sat, 28 Nov 2015 18:45:42 +0000 (19:45 +0100)]
bind: tmp doesn't point to start of allocated memory
Ruben Kerkhof [Sat, 28 Nov 2015 17:48:20 +0000 (18:48 +0100)]
amqp: use the right buffer size for sstrncpy
buffer is a char *, not an array, so size_of returns the size
of the pointer.
Ruben Kerkhof [Sat, 28 Nov 2015 17:30:58 +0000 (18:30 +0100)]
powerdns plugin: fix array initialization
Ruben Kerkhof [Sat, 28 Nov 2015 13:54:54 +0000 (14:54 +0100)]
Fix build with older version of libprotobuf-c
Ruben Kerkhof [Tue, 4 Aug 2015 13:40:34 +0000 (15:40 +0200)]
gcrypt: take search path into account
Ruben Kerkhof [Tue, 4 Aug 2015 13:28:03 +0000 (15:28 +0200)]
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.
Ruben Kerkhof [Sun, 9 Aug 2015 17:05:25 +0000 (19:05 +0200)]
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.
Ruben Kerkhof [Sun, 9 Aug 2015 17:02:25 +0000 (19:02 +0200)]
protoc: check for libprotobuf-c as well
Ruben Kerkhof [Sun, 9 Aug 2015 16:28:30 +0000 (18:28 +0200)]
protoc: simplify configure check
Ruben Kerkhof [Sun, 9 Aug 2015 15:23:11 +0000 (17:23 +0200)]
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
Ruben Kerkhof [Sun, 9 Aug 2015 15:02:33 +0000 (17:02 +0200)]
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.
Ruben Kerkhof [Sun, 9 Aug 2015 14:09:57 +0000 (16:09 +0200)]
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
Ruben Kerkhof [Sun, 9 Aug 2015 13:52:33 +0000 (15:52 +0200)]
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.
Ruben Kerkhof [Sun, 9 Aug 2015 13:50:55 +0000 (15:50 +0200)]
Pinba: only compile .proto files when enabled
If the pinba plugin is not enabled there's no
need to compile the protobuf files.
Ruben Kerkhof [Sat, 25 Jul 2015 13:21:52 +0000 (15:21 +0200)]
utils_mount: use reentrant getmntent_r when we can
Fixes #1162
Florian Forster [Mon, 30 Nov 2015 19:02:23 +0000 (20:02 +0100)]
ntp plugin: Unify casting to gauge_t.
Also add note about STA_NANO.
Issue: #1314.
Pierre Fersing [Tue, 20 Oct 2015 09:27:41 +0000 (11:27 +0200)]
Fix NTP kerninfo offset/estimated error scaling
Florian Forster [Mon, 30 Nov 2015 12:31:49 +0000 (13:31 +0100)]
cpu plugin: Improve error message for host_processors() failing.
Issue: #22
Ruben Kerkhof [Sun, 29 Nov 2015 15:40:50 +0000 (16:40 +0100)]
rrdtool: unlock mutex on error
CID 37972
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sat, 28 Nov 2015 19:19:26 +0000 (20:19 +0100)]
csv plugin: plug memory leak on error
CID 38015
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Sun, 29 Nov 2015 17:14:28 +0000 (18:14 +0100)]
rrdtool: release another lock on error
CID 37973
Signed-off-by: Florian Forster <octo@collectd.org>
Sam Pointer [Wed, 25 Nov 2015 15:43:07 +0000 (15:43 +0000)]
the swrite interface is 'non-zero'
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 27 Nov 2015 21:14:08 +0000 (22:14 +0100)]
snmp plugin: plug leak in error path.
Partial back port of #1368.
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 27 Nov 2015 21:00:10 +0000 (22:00 +0100)]
processes.c: plug memory leak in error path
Found with Infer (http://fbinfer.com/)
Signed-off-by: Florian Forster <octo@collectd.org>
Corey Kosak [Wed, 25 Nov 2015 21:54:30 +0000 (16:54 -0500)]
c_avl_pick needs to update the 'size' field of the tree when it deletes
a node.
Signed-off-by: Florian Forster <octo@collectd.org>
Corey Kosak [Wed, 25 Nov 2015 22:03:47 +0000 (17:03 -0500)]
Remove duplicate call to pthread_mutex_destroy.
Florian Forster [Wed, 25 Nov 2015 10:51:04 +0000 (11:51 +0100)]
statsd plugin: Correctly free metrics at shutdown.
The previous shutdown handler leaked "timer" and "set" metrics. This is
not a huge problem in itself, as the daemon is exiting shortly after
anyway, but it makes debugging of memory leaks very hard.
Issue: #997
Florian Forster [Fri, 20 Nov 2015 10:01:38 +0000 (11:01 +0100)]
apache plugin: DRY: use macro to determine number of fields.
Marc Fournier [Sun, 15 Nov 2015 10:49:06 +0000 (11:49 +0100)]
apache: parse whole response, not only the first 16 lines
mod_status recently started reporting more statistics. According to
http://www.apache.org/dist/httpd/CHANGES_2.4 `mod_proxy, mod_ssl,
mod_cache_socache, mod_socache_*: Support machine readable server-status
produced when using the "?auto" query string.` for version 2.4.13
onwards.
As we can't assume everything we need will be included in the first 16
lines of output anymore, we now simply scan through the whole output.
Tamás Földesi [Wed, 8 Jul 2015 15:02:14 +0000 (17:02 +0200)]
Remove POLLRDNORM (equivalent to POLLIN)
Tamás Földesi [Tue, 30 Jun 2015 17:06:28 +0000 (19:06 +0200)]
Checking for closed peer connection before send
Nathan Ward [Thu, 29 Oct 2015 01:22:44 +0000 (14:22 +1300)]
Fix clang complaining about extraneous parenthesis.
Nathan Ward [Wed, 28 Oct 2015 12:46:29 +0000 (01:46 +1300)]
ASN_GAUGE (SNMP-SMIv2 Gauge32) is unsigned, not signed.
Jan Andres [Wed, 21 Oct 2015 11:50:43 +0000 (13:50 +0200)]
Start write threads after plugin initialization.
Some plugins such as "network" create own threads from within their
init callbacks which can then start submitting data to the queue
right away, even if the read threads haven't been started yet.
If write threads are started before plugin initialization, this can
result in a race where a plugin's write callback gets called before
that plugin's init callback has completed.
To fix this, delay starting the write threads until after all plugins
have been initialized.
Pierre-Yves Ritschard [Mon, 19 Oct 2015 09:53:26 +0000 (11:53 +0200)]
statsd: provide a gauge for counters, holding the absolute count.
When not using StoreRates false, this allows statsd aggregators
to hold on to the absolute count, if needed.
Sergey [Tue, 3 Nov 2015 06:19:50 +0000 (07:19 +0100)]
apcups: prefix plugin name in INFO and DEBUG statements
Fixes #1329
Marc Fournier [Tue, 27 Oct 2015 22:32:20 +0000 (23:32 +0100)]
write_redis: remove unused variable from wr_write()
Marc Fournier [Fri, 23 Oct 2015 13:56:58 +0000 (15:56 +0200)]
collectd.conf.pod: correct a small typo
Douglas Thrift [Tue, 20 Oct 2015 23:19:02 +0000 (16:19 -0700)]
Fix a few typos in collectd-exec(5)
Herve COMMOWICK [Wed, 14 Oct 2015 06:57:05 +0000 (08:57 +0200)]
processes: correctly count processes on FreeBSD
because actually we count threads instead of processes
(partial backport of
85c31a6d66 for collectd-5.4 /mf)
Sven Trenkel [Sun, 4 Oct 2015 00:05:24 +0000 (00:05 +0000)]
python: Fix double-free bug.
Marc Fournier [Sun, 13 Sep 2015 22:03:44 +0000 (00:03 +0200)]
gmond: fix linking against libganglia at build time
Current versions of libganglia don't ship the ganglia-config utility
anymore. Change the configure script to not expect it to be in $PATH and
provide sensible defaults instead.
Fix #1129
Ruben Kerkhof [Sat, 1 Aug 2015 17:03:34 +0000 (19:03 +0200)]
mysql: use mysql_config --include for include path
According to the mysql_config manpage, --cflags shows the
compiler flags the library was compiled with. We certainly don't
want to use those.
Ruben Kerkhof [Sat, 1 Aug 2015 17:02:15 +0000 (19:02 +0200)]
mysql: just search for mysql_get_server_version
If we found that symbol, assume we also found mysql_init.
Ruben Kerkhof [Sat, 1 Aug 2015 16:59:53 +0000 (18:59 +0200)]
mysql: respect mysql_libs when searching for symbol
We always looked in libmysqlclient, but this doesn't
work for compatible databases such as Percona.
Respect the list return by mysql_config --libs_r instead.
Fixes #1098
Denys Berkovskyy [Tue, 8 Sep 2015 10:38:18 +0000 (11:38 +0100)]
Fix copy-paste error in debug message in snmp plugin
Ruben Kerkhof [Fri, 14 Aug 2015 20:25:20 +0000 (22:25 +0200)]
Fix harmless build warnings with newer binutils
I see a lot of those on Rawhide:
ar: `u' modifier ignored since `D' is the default (see `U')
It's going to take a while to get this fixed upstream.
Meanwhile, silence the warnings.
Macro copied from libvirt.
Ruben Kerkhof [Sun, 16 Aug 2015 10:28:43 +0000 (12:28 +0200)]
liboconfig: Fix implicit declaration warning
strlen declaration is in string.h
Ruben Kerkhof [Sun, 16 Aug 2015 11:47:24 +0000 (13:47 +0200)]
Don't unlock lock twice
Fixes make check on OpenBSD
Ruben Kerkhof [Sun, 16 Aug 2015 12:39:23 +0000 (14:39 +0200)]
pf: fix compilation on OpenBSD
Ruben Kerkhof [Sun, 16 Aug 2015 13:07:03 +0000 (15:07 +0200)]
dns: fix compilation on OpenBSD
OpenBSD doesn't have pcap-bpf.h
pcap.h has been including pcap/bpf.h since 2006.
Since we require a pcap which has PCAP_ERROR_IFACE_NOT_UP, introduced in 2008
this shouldn't break anything.
Marc Fournier [Wed, 26 Aug 2015 21:28:50 +0000 (23:28 +0200)]
coding style fixes over
94e5622
Gautam BT [Mon, 9 Feb 2015 11:01:24 +0000 (16:31 +0530)]
Fix pipe leak in exec plugin
Fixes #762
Ruben Kerkhof [Sun, 9 Aug 2015 17:46:08 +0000 (19:46 +0200)]
ltdl: only compile included libltdl when needed
If configure finds an external libltdl, it's going to
use it, so there's no use in compiling the shipped libltdl.
Marc Fournier [Wed, 5 Aug 2015 16:05:02 +0000 (18:05 +0200)]
routeros: fix a small build error pointed out by clang
routeros.c:334:35: error: 'memset' call operates on objects of type 'cr_data_t' (aka 'struct cr_data_s') while the size is based on a different type 'cr_data_t *' (aka 'struct cr_data_s *') [-Werror,-Wsizeof-pointer-memaccess]
memset (router_data, 0, sizeof (router_data));
~~~~~~~~~~~ ^~~~~~~~~~~
routeros.c:334:35: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
memset (router_data, 0, sizeof (router_data));
^~~~~~~~~~~
Marc Fournier [Tue, 4 Aug 2015 16:39:33 +0000 (18:39 +0200)]
Revert "amqp: look for librabbitmq in /usr/local as well"
This reverts commit
c1c5087fd5d9e66427cee8c98c523519d578bee6.
... as a follow-up to the discussion which took place in #1201
Ruben Kerkhof [Sat, 1 Aug 2015 09:46:45 +0000 (11:46 +0200)]
Fix libmodbus detection on FreeBSD
We look for modbus/modbus.h in /usr/local/include/modbus
but we should look for modbus.h
This is only an issue on FreeBSD since /usr/local/include is not
in the default search path.