projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bca8a6
)
postgresql plugin: Remove invalid free().
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
e613662
..
78f6fe5
100644
(file)
--- a/
src/postgresql.c
+++ b/
src/postgresql.c
@@
-1161,7
+1161,7
@@
static int c_psql_config_writer (oconfig_item_t *ci)
writers = tmp;
writer = writers + writers_num;
-
++writers_num
;
+
memset (writer, 0, sizeof (*writer))
;
writer->name = sstrdup (ci->values[0].value.string);
writer->statement = NULL;
@@
-1181,10
+1181,10
@@
static int c_psql_config_writer (oconfig_item_t *ci)
if (status != 0) {
sfree (writer->statement);
sfree (writer->name);
- sfree (writer);
return status;
}
+ ++writers_num;
return 0;
} /* c_psql_config_writer */