summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3e792dc)
raw | patch | inline | side by side (parent: 3e792dc)
author | Florian Forster <octo@huhu.verplant.org> | |
Thu, 16 Oct 2008 08:05:31 +0000 (10:05 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 16 Oct 2008 08:07:41 +0000 (10:07 +0200) |
The postgresql plugin is missing a couple of PQclear() calls
Thanks to Admin <collectd-info@internode.com.au> for pointing this out.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Thanks to Admin <collectd-info@internode.com.au> for pointing this out.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/postgresql.c | patch | blob | history |
diff --git a/src/postgresql.c b/src/postgresql.c
index 9438c576039a64547bfd787430b02e3b1ad09431..9959690a1ad8553c1f40567a8dc14778f3052ac7 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
}
rows = PQntuples (res);
- if (1 > rows)
+ if (1 > rows) {
+ PQclear (res);
return 0;
+ }
cols = PQnfields (res);
if (query->cols_num != cols) {
submit_gauge (db, col.type, col.type_instance, value);
}
}
+ PQclear (res);
return 0;
} /* c_psql_exec_query */