diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-11-18 12:32:49 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-11-18 12:32:49 +0100 |
commit | ba2c160b320b5cc4dfb5190500237e09d8b5b54c (patch) | |
tree | 017300657a01bc12aa818c9ea5ffe820cf775333 | |
parent | 599133164d93afb0dab792dadb8f5d6bc3d68a3f (diff) | |
parent | c2fef48bd32ac6fcd6c8664976a39424187f4872 (diff) | |
download | rsyslog-ba2c160b320b5cc4dfb5190500237e09d8b5b54c.tar.gz rsyslog-ba2c160b320b5cc4dfb5190500237e09d8b5b54c.tar.xz rsyslog-ba2c160b320b5cc4dfb5190500237e09d8b5b54c.zip |
Merge branch 'beta'
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | plugins/ompgsql/ompgsql.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1009,6 +1009,10 @@ Version 3.10.0 (rgerhards), 2008-01-07 - much cleaner code due to new objects and removal of single-threading mode --------------------------------------------------------------------------- +Version 2.0.7 V2-STABLE (rgerhards), 2008-??-?? +- bugfix: memory leak in ompgsql + Thanks to Ken for providing the patch +--------------------------------------------------------------------------- Version 2.0.6 V2-STABLE (rgerhards), 2008-??-?? - bugfix: memory leaks in rsyslogd, primarily in singlethread mode Thanks to Frederico Nunez for providing the fix diff --git a/plugins/ompgsql/ompgsql.c b/plugins/ompgsql/ompgsql.c index f8685672..7658f036 100644 --- a/plugins/ompgsql/ompgsql.c +++ b/plugins/ompgsql/ompgsql.c @@ -167,12 +167,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); |