summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3bca8a6)
raw | patch | inline | side by side (parent: 3bca8a6)
author | Florian Forster <octo@collectd.org> | |
Tue, 8 Dec 2015 10:49:56 +0000 (11:49 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 8 Dec 2015 10:49:56 +0000 (11:49 +0100) |
CID: 37936
src/postgresql.c | patch | blob | history |
diff --git a/src/postgresql.c b/src/postgresql.c
index e613662ae1510893cd6df91ae6652c503e1e238f..78f6fe574c2428f523532dde74b911547d58696f 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
writers = tmp;
writer = writers + writers_num;
- ++writers_num;
+ memset (writer, 0, sizeof (*writer));
writer->name = sstrdup (ci->values[0].value.string);
writer->statement = NULL;
if (status != 0) {
sfree (writer->statement);
sfree (writer->name);
- sfree (writer);
return status;
}
+ ++writers_num;
return 0;
} /* c_psql_config_writer */