[collectd] [PATCH] postgresql plugin: Added another missing call to PQclear().

Sebastian Harl sh at tokkee.org
Tue Oct 14 12:57:21 CEST 2008


Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
 src/postgresql.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/postgresql.c b/src/postgresql.c
index 43f5af5..eecfa6b 100644
--- a/src/postgresql.c
+++ b/src/postgresql.c
@@ -424,6 +424,7 @@ static int c_psql_exec_query (c_psql_database_t *db, int idx)
 		log_err ("SQL query returned wrong number of fields "
 				"(expected: %i, got: %i)", query->cols_num, cols);
 		log_info ("SQL query was: %s", query->query);
+		PQclear (res);
 		return -1;
 	}
 
-- 
1.5.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20081014/4ad4e305/attachment.pgp 


More information about the collectd mailing list