summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 44dcf20)
raw | patch | inline | side by side (parent: 44dcf20)
author | Manuel Luis Sanmartin Rozada <manuel.luis@gmail.com> | |
Tue, 6 Aug 2013 10:30:52 +0000 (12:30 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 7 Aug 2013 07:42:01 +0000 (09:42 +0200) |
If you define twice DataDir:
<Plugin csv>
DataDir "/opt/collectd/var/lib/collectd/csv"
DataDir stdout
</Plugin>
the second time datadir will not be null and
you will get garbage in value_list_to_filename
Signed-off-by: Florian Forster <octo@collectd.org>
<Plugin csv>
DataDir "/opt/collectd/var/lib/collectd/csv"
DataDir stdout
</Plugin>
the second time datadir will not be null and
you will get garbage in value_list_to_filename
Signed-off-by: Florian Forster <octo@collectd.org>
src/csv.c | patch | blob | history |
diff --git a/src/csv.c b/src/csv.c
index f123c5d6dae1960d6fe91a53c16765d27eda4356..958e34baf0d96d825e8ce9dfa79a21849db6e3d2 100644 (file)
--- a/src/csv.c
+++ b/src/csv.c
if (strcasecmp ("DataDir", key) == 0)
{
if (datadir != NULL)
+ {
free (datadir);
+ datadir = NULL;
+ }
if (strcasecmp ("stdout", value) == 0)
{
use_stdio = 1;