summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-07-17 19:32:11 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-07-17 19:32:11 +0200
commit0f7622dd1f9a4b146324d432d421e46cdaa06c09 (patch)
treed014226b96da8acc97af24e0bc939107b1c74bcf
parent1ea14f211ba0e7351c7da745a5411c7efdeb3cbd (diff)
parent62090c416cd0b7f4b67a68a81b5c37e2d27cf84e (diff)
downloadrsyslog-0f7622dd1f9a4b146324d432d421e46cdaa06c09.tar.gz
rsyslog-0f7622dd1f9a4b146324d432d421e46cdaa06c09.tar.bz2
rsyslog-0f7622dd1f9a4b146324d432d421e46cdaa06c09.zip
Merge branch 'v7-stable'
-rw-r--r--ChangeLog5
-rw-r--r--runtime/msg.c4
-rw-r--r--runtime/queue.c7
3 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index eeed6dcd..9d535aca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -69,6 +69,8 @@ Version 7.5.0 [devel] 2013-06-11
Thanks to Axel Rau for the patch.
---------------------------------------------------------------------------
Version 7.4.3 [v7.4-stable] 2013-07-??
+- bugfix: memory leak if disk queues were used and json data present
+- bugfix: CEE/json data was lost during disk queue operation
- bugfix: potential segfault during startup on invalid config
could happen if invalid actions were present, which could lead
to improper handling in optimizer.
@@ -76,6 +78,9 @@ Version 7.4.3 [v7.4-stable] 2013-07-??
- bugfix: omlibdbi did not properly close connection on some errors
This happened to errors occuring in Begin/End Transaction entry
points.
+- cosmetic bugfix: file name buffer was not freed on disk queue destruction
+ This was an extremely small one-time per run memleak, so nothing of
+ concern. However, it bugs under valgrind and similar memory debuggers.
- fix build on FreeBSD
Thanks to Christiano Rolim for the patch
---------------------------------------------------------------------------
diff --git a/runtime/msg.c b/runtime/msg.c
index 9d5fa883..a227567e 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -1113,7 +1113,6 @@ MsgDeserialize(msg_t *pMsg, strm_t *pStrm)
prop_t *propRcvFrom = NULL;
prop_t *propRcvFromIP = NULL;
struct json_tokener *tokener;
- struct json_object *json;
var_t *pVar = NULL;
DEFiRet;
@@ -1197,8 +1196,9 @@ MsgDeserialize(msg_t *pMsg, strm_t *pStrm)
}
if(isProp("json")) {
tokener = json_tokener_new();
- json = json_tokener_parse_ex(tokener, (char*)rsCStrGetSzStrNoNULL(pVar->val.pStr),
+ pMsg->json = json_tokener_parse_ex(tokener, (char*)rsCStrGetSzStrNoNULL(pVar->val.pStr),
cstrLen(pVar->val.pStr));
+ json_tokener_free(tokener);
reinitVar(pVar);
CHKiRet(objDeserializeProperty(pVar, pStrm));
}
diff --git a/runtime/queue.c b/runtime/queue.c
index c9c236fd..cfb455da 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -898,7 +898,8 @@ static rsRetVal qDestructDisk(qqueue_t *pThis)
DEFiRet;
ASSERT(pThis != NULL);
-
+
+ free(pThis->pszQIFNam);
if(pThis->tVars.disk.pWrite != NULL)
strm.Destruct(&pThis->tVars.disk.pWrite);
if(pThis->tVars.disk.pReadDeq != NULL)
@@ -2596,7 +2597,9 @@ doEnqSingleObj(qqueue_t *pThis, flowControl_t flowCtlType, msg_t *pMsg)
&& pThis->tVars.disk.sizeOnDisk > pThis->sizeOnDiskMax)) {
STATSCOUNTER_INC(pThis->ctrFull, pThis->mutCtrFull);
if(pThis->toEnq == 0 || pThis->bEnqOnly) {
- DBGOPRINT((obj_t*) pThis, "doEnqSingleObject: queue FULL - configured for immediate discarding QueueSize=%d MaxQueueSize=%d sizeOnDisk=%d sizeOnDiskMax=%d\n", pThis->iQueueSize, pThis->iMaxQueueSize, pThis->tVars.disk.sizeOnDisk, pThis->sizeOnDiskMax);
+ DBGOPRINT((obj_t*) pThis, "doEnqSingleObject: queue FULL - configured for immediate discarding QueueSize=%d "
+ "MaxQueueSize=%d sizeOnDisk=%lld sizeOnDiskMax=%lld\n", pThis->iQueueSize, pThis->iMaxQueueSize,
+ pThis->tVars.disk.sizeOnDisk, pThis->sizeOnDiskMax);
STATSCOUNTER_INC(pThis->ctrFDscrd, pThis->mutCtrFDscrd);
msgDestruct(&pMsg);
ABORT_FINALIZE(RS_RET_QUEUE_FULL);