summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKen <ktm@rice.edu>2008-11-18 12:30:57 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2008-11-18 12:30:57 +0100
commit48319cd31f3d15f1417d4ebd8003d93978ad36a9 (patch)
tree64f12dfa69506ec7da73e6475e45ca64a7ebb1f2 /plugins
parentf35197f1c2136b5e043cdf4776f99b4854bfcc5c (diff)
downloadrsyslog-48319cd31f3d15f1417d4ebd8003d93978ad36a9.tar.gz
rsyslog-48319cd31f3d15f1417d4ebd8003d93978ad36a9.tar.xz
rsyslog-48319cd31f3d15f1417d4ebd8003d93978ad36a9.zip
bugfix: removed memory leak in ompgsql
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ompgsql/ompgsql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/ompgsql/ompgsql.c b/plugins/ompgsql/ompgsql.c
index 24a68a5f..db48982b 100644
--- a/plugins/ompgsql/ompgsql.c
+++ b/plugins/ompgsql/ompgsql.c
@@ -177,12 +177,12 @@ rsRetVal writePgSQL(uchar *psz, instanceData *pData)
dbgprintf("writePgSQL: %s", psz);
/* try insert */
- PQexec(pData->f_hpgsql, (char*)psz);
+ PQclear(PQexec(pData->f_hpgsql, (char*)psz));
if(PQstatus(pData->f_hpgsql) != CONNECTION_OK) {
/* error occured, try to re-init connection and retry */
closePgSQL(pData); /* close the current handle */
CHKiRet(initPgSQL(pData, 0)); /* try to re-open */
- PQexec(pData->f_hpgsql, (char*)psz);
+ PQclear(PQexec(pData->f_hpgsql, (char*)psz));
if(PQstatus(pData->f_hpgsql) != CONNECTION_OK) { /* re-try insert */
/* we failed, giving up for now */
reportDBError(pData, 0);