Code

collectd.git
8 years agoMerge pull request #1453 from rubenk/configure-dont-output-pkgconfig-errors
Ruben Kerkhof [Fri, 11 Dec 2015 20:36:53 +0000 (21:36 +0100)]
Merge pull request #1453 from rubenk/configure-dont-output-pkgconfig-errors

libnotify: Don't output multiple lines of errors

8 years agoMerge pull request #1452 from rubenk/configure-silence-configure-check
Ruben Kerkhof [Fri, 11 Dec 2015 20:36:31 +0000 (21:36 +0100)]
Merge pull request #1452 from rubenk/configure-silence-configure-check

configure.ac: send output of check to /dev/null

8 years agoMerge pull request #1442 from rubenk/omnios-fix-make-check
Ruben Kerkhof [Fri, 11 Dec 2015 20:35:38 +0000 (21:35 +0100)]
Merge pull request #1442 from rubenk/omnios-fix-make-check

Fix make check on OmniOS

8 years agoMerge pull request #1456 from rubenk/onewire-fixup-flag-handling
Ruben Kerkhof [Fri, 11 Dec 2015 18:33:40 +0000 (19:33 +0100)]
Merge pull request #1456 from rubenk/onewire-fixup-flag-handling

onewire plugin: fixup flag handling

8 years agoonewire plugin: fixup flag handling
Ruben Kerkhof [Fri, 11 Dec 2015 16:59:21 +0000 (17:59 +0100)]
onewire plugin: fixup flag handling

Split flags in _LDFLAGS and _LIBS
Allows the plugin to be detected and to be build on FreeBSD

8 years agolibnotify: Don't output multiple lines of errors
Ruben Kerkhof [Fri, 11 Dec 2015 16:08:44 +0000 (17:08 +0100)]
libnotify: Don't output multiple lines of errors

The errors pkg-config returns are not very helpful and they
break our nicely formatted list of found and absent libraries.

Just say that the package can't be found, like we do for the rest
of the packages we need.

8 years agoconfigure.ac: send output of check to /dev/null
Ruben Kerkhof [Fri, 11 Dec 2015 16:03:58 +0000 (17:03 +0100)]
configure.ac: send output of check to /dev/null

The output is quite a long line:
kern.cp_times: 10336 0 9848 499639 7613098 18834 0 11963 115 8101970 16444 0 14368 1672 8100398 17584 0 14149 1358 8099791

And we have no use for the result, we just want to know if the sysctl exists.

8 years agosrc/daemon/utils_time.c: Rewrite format_zone() using strftime().
Florian Forster [Thu, 10 Dec 2015 09:45:11 +0000 (10:45 +0100)]
src/daemon/utils_time.c: Rewrite format_zone() using strftime().

The "extern long timezone", while specified by X/Open, is not available
on FreeBSD. There, timezone() is a function.

8 years ago.gitignore: Ignore all files starting with "test_".
Florian Forster [Wed, 9 Dec 2015 10:57:43 +0000 (11:57 +0100)]
.gitignore: Ignore all files starting with "test_".

8 years agoMerge branch 'collectd-5.5'
Florian Forster [Wed, 9 Dec 2015 08:54:09 +0000 (09:54 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Wed, 9 Dec 2015 08:49:55 +0000 (09:49 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agocurl_json plugin: Rewrite logic to add a path to db->tree.
Florian Forster [Wed, 9 Dec 2015 08:44:24 +0000 (09:44 +0100)]
curl_json plugin: Rewrite logic to add a path to db->tree.

CID: 37991

8 years agocurl_xml plugin: Correctly free xpath object.
Florian Forster [Tue, 8 Dec 2015 15:56:52 +0000 (16:56 +0100)]
curl_xml plugin: Correctly free xpath object.

CID: 37993
Signed-off-by: Florian Forster <octo@collectd.org>
8 years agoMerge branch 'collectd-5.5'
Florian Forster [Tue, 8 Dec 2015 13:42:07 +0000 (14:42 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Tue, 8 Dec 2015 13:39:07 +0000 (14:39 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoping plugin: Protect access to ping_thread_error.
Florian Forster [Tue, 8 Dec 2015 13:38:05 +0000 (14:38 +0100)]
ping plugin: Protect access to ping_thread_error.

This is primarily to make Coverity happy.

CID: 37976

8 years agoping plugin: Remove "static" from local variable.
Florian Forster [Tue, 8 Dec 2015 13:31:33 +0000 (14:31 +0100)]
ping plugin: Remove "static" from local variable.

This caused Coverity to see concurrency issues where there are none.

CID: 37934

8 years agorrdtool plugin: Improve handling of the "DataDir" option.
Florian Forster [Tue, 8 Dec 2015 13:22:54 +0000 (14:22 +0100)]
rrdtool plugin: Improve handling of the "DataDir" option.

CID: 37977

8 years agopython plugin: Check return value of cpy_unicode_or_bytes_to_string().
Florian Forster [Tue, 8 Dec 2015 12:54:17 +0000 (13:54 +0100)]
python plugin: Check return value of cpy_unicode_or_bytes_to_string().

CID: 37984

8 years agopython plugin: Check return value of malloc().
Florian Forster [Tue, 8 Dec 2015 12:44:28 +0000 (13:44 +0100)]
python plugin: Check return value of malloc().

CID: 37981, 37982, 37983

8 years agopython plugin: Fix memory leak.
Florian Forster [Tue, 8 Dec 2015 12:41:35 +0000 (13:41 +0100)]
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

8 years agotail plugin: Fix memory leak.
Florian Forster [Tue, 8 Dec 2015 12:14:47 +0000 (13:14 +0100)]
tail plugin: Fix memory leak.

CID: 38013

8 years agopostgresql plugin: Register a new user data pointer with udb_query_set_user_data...
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

8 years agoemail plugin: Refactor the accept() loop.
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

8 years agoemail plugin: Free "connection" in error handling.
Florian Forster [Tue, 8 Dec 2015 10:56:09 +0000 (11:56 +0100)]
email plugin: Free "connection" in error handling.

CID: 38010

8 years agopostgresql plugin: Remove invalid free().
Florian Forster [Tue, 8 Dec 2015 10:49:56 +0000 (11:49 +0100)]
postgresql plugin: Remove invalid free().

CID: 37936

8 years agosrc/collectd-tg.c: Explicitly null-terminate string.
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>
8 years agosrc/utils_format_json.c: Check return value of json_escape_string().
Florian Forster [Tue, 8 Dec 2015 10:30:38 +0000 (11:30 +0100)]
src/utils_format_json.c: Check return value of json_escape_string().

CID: 37946

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Tue, 8 Dec 2015 10:33:46 +0000 (11:33 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agosrc/utils_format_json.c: Make sure "keys" is freed in all error paths.
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

8 years agocollectd, collectdmon: Store return value of open() and dup().
Florian Forster [Tue, 8 Dec 2015 10:14:28 +0000 (11:14 +0100)]
collectd, collectdmon: Store return value of open() and dup().

This is to make Coverity happy.

CID: 38011, 38012

8 years agoMerge remote-tracking branch 'github/pr/1437'
Florian Forster [Tue, 8 Dec 2015 09:44:13 +0000 (10:44 +0100)]
Merge remote-tracking branch 'github/pr/1437'

8 years agosrc/daemon/utils_time.h: Avoid incorrect rounding in CDTIME_T_TO_TIME{VAL,SPEC}.
Florian Forster [Tue, 8 Dec 2015 09:33:17 +0000 (10:33 +0100)]
src/daemon/utils_time.h: Avoid incorrect rounding in CDTIME_T_TO_TIME{VAL,SPEC}.

This change also partially expands CDTIME_T_TO_{US,NS} to avoid dead
code warnings in Coverity.

Fixes: #1446
CID: 37950, 37951, 37952, 37953, 37954, 41722

8 years agosrc/daemon/utils_time_test.c: Check the "tv_sec" field of struct time{val,spec}.
Florian Forster [Tue, 8 Dec 2015 09:32:40 +0000 (10:32 +0100)]
src/daemon/utils_time_test.c: Check the "tv_sec" field of struct time{val,spec}.

Also fixes an incorrect "expected" test value.

Issue: #1446

8 years agoMerge remote-tracking branch 'github/pr/1440'
Florian Forster [Tue, 8 Dec 2015 09:00:30 +0000 (10:00 +0100)]
Merge remote-tracking branch 'github/pr/1440'

8 years agosigrok plugin: don't pass status to strerror
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>
8 years agoMerge remote-tracking branch 'github/pr/1438'
Florian Forster [Tue, 8 Dec 2015 08:24:22 +0000 (09:24 +0100)]
Merge remote-tracking branch 'github/pr/1438'

8 years agointerface plugin: Fix review comments.
Yoga Ramalingam [Mon, 7 Dec 2015 20:59:39 +0000 (15:59 -0500)]
interface plugin: Fix review comments.

Issue: #1416

8 years agointerface plugin: Add UniqueName config property.
Yoga Ramalingam [Mon, 7 Dec 2015 15:09:08 +0000 (10:09 -0500)]
interface plugin: Add UniqueName config property.

Issue: #1416

8 years agointerface plugin: Fix duplicate interface metrics for Solaris.
Yoga Ramalingam [Fri, 4 Dec 2015 21:08:54 +0000 (16:08 -0500)]
interface plugin: Fix duplicate interface metrics for Solaris.

Issue: #1416

8 years agoMerge branch 'collectd-5.5'
Ruben Kerkhof [Sun, 6 Dec 2015 15:43:11 +0000 (16:43 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge remote-tracking branch 'collectd/collectd-5.4' into collectd-5.5
Ruben Kerkhof [Sun, 6 Dec 2015 15:40:36 +0000 (16:40 +0100)]
Merge remote-tracking branch 'collectd/collectd-5.4' into collectd-5.5

8 years agoMerge pull request #1441 from chicha/fix-gitignore
Ruben Kerkhof [Sun, 6 Dec 2015 14:36:57 +0000 (15:36 +0100)]
Merge pull request #1441 from chicha/fix-gitignore

.gitignore: ignore test_plugin_ceph

8 years agoFix make check on OmniOS
Ruben Kerkhof [Sun, 6 Dec 2015 14:24:16 +0000 (15:24 +0100)]
Fix make check on OmniOS

We need the defines from config.h before
we include <testing.h>, or we get the following error on OmniOS:

make  test_common test_meta_data  test_utils_avltree test_utils_heap  test_utils_time test_utils_subst
gcc -DHAVE_CONFIG_H -I. -I../../src  -I../../src -DPREFIX='"/opt/collectd"'  -DCONFIGFILE='"/opt/collectd/etc/collectd.conf"'  -DLOCALSTATEDIR='"/opt/collectd/var"'  -DPKGLOCALSTATEDIR='"/opt/collectd/var/lib/collectd"'  -DPIDFILE='"/opt/collectd/var/run/collectd.pid"' -DPLUGINDIR='"/opt/collectd/lib/collectd"'  -DPKGDATADIR='"/opt/collectd/share/collectd"'   -Wall -Werror -g -O2 -c -o common_test.o common_test.c
In file included from collectd.h:31:0,
                 from common.h:31,
                 from common_test.c:28:
../../src/config.h:1631:0: error: "_FILE_OFFSET_BITS" redefined [-Werror]
 #define _FILE_OFFSET_BITS 64
 ^
In file included from /usr/include/inttypes.h:41:0,
                 from ../../src/testing.h:30,
                 from common_test.c:27:
/opt/gcc-5.1.0/lib/gcc/i386-pc-solaris2.11/5.1.0/include-fixed/sys/feature_tests.h:231:0: note: this is the location of the previous definition
 #define _FILE_OFFSET_BITS 32
 ^
cc1: all warnings being treated as errors
*** Error code 1
make: Fatal error: Command failed for target `common_test.o'

8 years ago.gitignore: ignore test_plugin_ceph
Charles-Henri d'Adhémar [Sun, 6 Dec 2015 14:19:44 +0000 (15:19 +0100)]
.gitignore: ignore test_plugin_ceph

8 years agowrite_kafka: fix two leaks on error
Ruben Kerkhof [Sun, 6 Dec 2015 11:21:45 +0000 (12:21 +0100)]
write_kafka: fix two leaks on error

CID #38124

8 years agoiptables plugin: indent consistently
Ruben Kerkhof [Sun, 6 Dec 2015 09:12:03 +0000 (10:12 +0100)]
iptables plugin: indent consistently

8 years agoiptables plugin: move comment to right place
Ruben Kerkhof [Sun, 6 Dec 2015 08:57:33 +0000 (09:57 +0100)]
iptables plugin: move comment to right place

8 years agomultimeter plugin: Initizliaze "struct termios".
Florian Forster [Sat, 5 Dec 2015 22:37:16 +0000 (23:37 +0100)]
multimeter plugin: Initizliaze "struct termios".

CID: 38036

8 years agoconfigure.ac: fix previous change to detect libjvm
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>
8 years agoMerge branch 'collectd-5.5'
Florian Forster [Sat, 5 Dec 2015 22:08:22 +0000 (23:08 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Sat, 5 Dec 2015 22:07:14 +0000 (23:07 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agometa_data.c: check return value of md_entry_alloc
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>
8 years agoiptables plugin: remove dead code
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>
8 years agosrc/filter_chain.c: Refactor fc_process_chain() a wee bit.
Florian Forster [Sat, 5 Dec 2015 21:49:05 +0000 (22:49 +0100)]
src/filter_chain.c: Refactor fc_process_chain() a wee bit.

8 years agosrc/filter_chain.c: Delete dead code.
Florian Forster [Sat, 5 Dec 2015 21:48:18 +0000 (22:48 +0100)]
src/filter_chain.c: Delete dead code.

CID: 37961

8 years agosrc/common.c: Check arguments of parse_values().
Florian Forster [Sat, 5 Dec 2015 21:30:39 +0000 (22:30 +0100)]
src/common.c: Check arguments of parse_values().

CID: 37965

8 years agolibcollectdclient: Check return value of setsockopt().
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>
8 years agoMerge branch 'collectd-5.5'
Florian Forster [Sat, 5 Dec 2015 21:06:46 +0000 (22:06 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Sat, 5 Dec 2015 21:06:35 +0000 (22:06 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoconfigure.ac: fix libjvm detection on OSX
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>
8 years agounixsock: check return value of chmod
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>
8 years agozookeeper plugin: remove dead code
Ruben Kerkhof [Sat, 5 Dec 2015 14:02:43 +0000 (15:02 +0100)]
zookeeper plugin: remove dead code

status cannot be 0 inside the loop

CID #37964

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agowrite_tsdb plugin: don't close a closed socket
Ruben Kerkhof [Sat, 5 Dec 2015 13:28:23 +0000 (14:28 +0100)]
write_tsdb plugin: don't close a closed socket

CID #37979 and #37980

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agozfs-arc plugin: check return value of malloc
Ruben Kerkhof [Sat, 5 Dec 2015 13:14:54 +0000 (14:14 +0100)]
zfs-arc plugin: check return value of malloc

CID #37989

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agobind plugin: plug small leak
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>
8 years agocurl_xml plugin: plug a few leaks on error
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>
8 years agostats plugin: close fd on error
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>
8 years agoutils_cache.c: plug leak on error
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>
8 years agoAggregration plugin: plug leak on error
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>
8 years agovarnish plugin: fix two resource leaks on error
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>
8 years agowrite_riemann plugin: plug leak on error
Ruben Kerkhof [Sat, 5 Dec 2015 11:11:26 +0000 (12:11 +0100)]
write_riemann plugin: plug leak on error

CID #37996

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agolibcollectdclient: free result of getaddrinfo
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>
8 years agowrite_sensu plugin: fix two resource leaks on error
Ruben Kerkhof [Sat, 5 Dec 2015 10:47:46 +0000 (11:47 +0100)]
write_sensu plugin: fix two resource leaks on error

CID #37999

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agomadwifi: make code a little bit clearer
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>
8 years agomosquitto plugin: fixup flag handling
Ruben Kerkhof [Sat, 5 Dec 2015 16:09:00 +0000 (17:09 +0100)]
mosquitto plugin: fixup flag handling

Split build flags in _LDFLAGS and _LIBS
Keep existing CPPFLAGS and LDFLAGS set from the command line.

This ensures we will pick up libmosquitto when running
./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib",
just like we do for other plugins.

8 years agoMerge branch 'collectd-5.5'
Florian Forster [Sat, 5 Dec 2015 07:57:07 +0000 (08:57 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Sat, 5 Dec 2015 07:56:17 +0000 (08:56 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoPinba plugin: close fd on error
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>
8 years agoMerge remote-tracking branch 'github/pr/1419'
Florian Forster [Sat, 5 Dec 2015 07:55:10 +0000 (08:55 +0100)]
Merge remote-tracking branch 'github/pr/1419'

8 years agoconfigfile.c: close dir on error
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>
8 years agoturbostat plugin: close fd on error
Ruben Kerkhof [Fri, 4 Dec 2015 22:08:46 +0000 (23:08 +0100)]
turbostat plugin: close fd on error

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agoutils_fbhash.c: fix resource leak on error
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>
8 years agomultimeter plugin: fix fd leak
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>
8 years agoMerge remote-tracking branch 'github/pr/1413'
Florian Forster [Sat, 5 Dec 2015 07:51:41 +0000 (08:51 +0100)]
Merge remote-tracking branch 'github/pr/1413'

8 years agopostgresql plugin: don't exit on malloc failure
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>
8 years agoperl: Check for NULL before dereferencing
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>
8 years agotable plugin: fix check for realloc
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>
8 years agoutils_mount.c: check for null before dereferencing
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>
8 years agoutils_mount.c: check for null before dereferencing
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>
8 years agozfs_arc plugin: leave enough room for terminating null
Ruben Kerkhof [Fri, 4 Dec 2015 20:09:02 +0000 (21:09 +0100)]
zfs_arc plugin: leave enough room for terminating null

CID #38028

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agoteamspeak2: fix potential use after close
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>
8 years agoMerge remote-tracking branch 'github/pr/1403'
Florian Forster [Sat, 5 Dec 2015 07:40:41 +0000 (08:40 +0100)]
Merge remote-tracking branch 'github/pr/1403'

8 years agoprocesses plugin: plug leak on error
Ruben Kerkhof [Fri, 4 Dec 2015 22:17:13 +0000 (23:17 +0100)]
processes plugin: plug leak on error

CID #38004

8 years agotypes_list.c: fix two resource leaks
Ruben Kerkhof [Fri, 4 Dec 2015 20:50:55 +0000 (21:50 +0100)]
types_list.c: fix two resource leaks

CID #38017

8 years agoMerge pull request #1404 from rubenk/libcollectdclient-fix-double-close
Ruben Kerkhof [Fri, 4 Dec 2015 20:12:06 +0000 (21:12 +0100)]
Merge pull request #1404 from rubenk/libcollectdclient-fix-double-close

libcollectdclient: don't close socket twice

8 years agoMerge pull request #1406 from rubenk/snmp-uninitialized-read
Ruben Kerkhof [Fri, 4 Dec 2015 20:11:51 +0000 (21:11 +0100)]
Merge pull request #1406 from rubenk/snmp-uninitialized-read

snmp plugin: don't read from uninitialized pointer

8 years agosnmp plugin: don't read from uninitialized pointer
Ruben Kerkhof [Fri, 4 Dec 2015 18:31:16 +0000 (19:31 +0100)]
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

8 years agolibcollectdclient: don't close socket twice
Ruben Kerkhof [Fri, 4 Dec 2015 18:02:32 +0000 (19:02 +0100)]
libcollectdclient: don't close socket twice

CID #38039

8 years agogit ignore src/daemon/test_utils_time
Charles-Henri d'Adhémar [Fri, 4 Dec 2015 16:46:31 +0000 (17:46 +0100)]
git ignore src/daemon/test_utils_time

Add src/daemon/test_utils_time to .gitignore.
Probably forgotten when introducing db1391aaa66b8b8fad82219494f61f3452441f62