summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-07-10 08:40:48 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-07-10 08:40:48 +0200
commit935157d45a01480627950bd8c97f55fe51a8983c (patch)
tree2211dea9aba95e3d2cc555ab1b3760b4b6a2bfb0
parent79114b5ce4b8807d05118e769443cfcfe64e4810 (diff)
downloadrsyslog-935157d45a01480627950bd8c97f55fe51a8983c.tar.gz
rsyslog-935157d45a01480627950bd8c97f55fe51a8983c.tar.xz
rsyslog-935157d45a01480627950bd8c97f55fe51a8983c.zip
bugfix: memory leak in disk queue modes
this is a backport from 3.19.10
-rw-r--r--queue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/queue.c b/queue.c
index 0f58c545..081f48b3 100644
--- a/queue.c
+++ b/queue.c
@@ -849,6 +849,8 @@ static rsRetVal qAddDisk(queue_t *pThis, void* pUsr)
pThis->tVars.disk.sizeOnDisk += nWriteCount;
+ /* The following line is a backport from 3.19.10 - fixes mem leak */
+ objDestruct(pUsr);
dbgoprint((obj_t*) pThis, "write wrote %lld octets to disk, queue disk size now %lld octets\n",
nWriteCount, pThis->tVars.disk.sizeOnDisk);