From d752786d4f5536828dc6d5cd1665f06d323e8844 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Oct 2012 09:27:30 +0200 Subject: re-enabled commented-out serialization support in debug handler --- runtime/debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/debug.c b/runtime/debug.c index edc4a255..307a8bb8 100644 --- a/runtime/debug.c +++ b/runtime/debug.c @@ -927,12 +927,12 @@ dbgprint(obj_t *pObj, char *pszMsg, size_t lenMsg) pszObjName = obj.GetName(pObj); } -// pthread_mutex_lock(&mutdbgprint); -// pthread_cleanup_push(dbgMutexCancelCleanupHdlr, &mutdbgprint); + pthread_mutex_lock(&mutdbgprint); + pthread_cleanup_push(dbgMutexCancelCleanupHdlr, &mutdbgprint); do_dbgprint(pszObjName, pszMsg, lenMsg); -// pthread_cleanup_pop(1); + pthread_cleanup_pop(1); } #pragma GCC diagnostic warning "-Wempty-body" -- cgit From a38ccf789944a0ffcba23dff40e318ad6475e451 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Oct 2012 09:33:12 +0200 Subject: fix small memory leak when template is specified in omfile --- tools/omfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/omfile.c b/tools/omfile.c index 1a36343f..715b218c 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -820,6 +820,7 @@ ENDcreateInstance BEGINfreeInstance CODESTARTfreeInstance + free(pData->tplName); free(pData->f_fname); if(pData->bDynamicName) { dynaFileFreeCache(pData); -- cgit From d5b9d43f6abfb8af1433062bb32953cb422ac380 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Oct 2012 09:35:29 +0200 Subject: fix small memory leak with string-type templates --- template.c | 1 + 1 file changed, 1 insertion(+) diff --git a/template.c b/template.c index 06306115..9cf35fd7 100644 --- a/template.c +++ b/template.c @@ -1753,6 +1753,7 @@ tplProcessCnf(struct cnfobj *o) pTpl->optFormatEscape = JSON_ESCAPE; finalize_it: + free(tplStr); if(pvals != NULL) cnfparamvalsDestruct(pvals, &pblk); if(iRet != RS_RET_OK) { -- cgit From e1037b5b1fa7e31cc9182085899c65dadcba26da Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Oct 2012 09:36:27 +0200 Subject: remove some assert()'s - valgrind does a better job... --- template.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/template.c b/template.c index 9cf35fd7..f62e8453 100644 --- a/template.c +++ b/template.c @@ -286,10 +286,6 @@ rsRetVal tplToJSON(struct template *pTpl, msg_t *pMsg, struct json_object **pjso struct json_object *json, *jsonf; DEFiRet; - assert(pTpl != NULL); - assert(pMsg != NULL); - assert(json != NULL); - json = json_object_new_object(); for(pTpe = pTpl->pEntryRoot ; pTpe != NULL ; pTpe = pTpe->pNext) { if(pTpe->eEntryType == CONSTANT) { -- cgit From 9de5fb77ebc219c0633c6204addaa6997a1da9d2 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Oct 2012 09:35:29 +0200 Subject: fix small memory leak with string-type templates --- template.c | 1 + 1 file changed, 1 insertion(+) diff --git a/template.c b/template.c index 8558dd8a..89e9a0c8 100644 --- a/template.c +++ b/template.c @@ -1847,6 +1847,7 @@ tplProcessCnf(struct cnfobj *o) pTpl->optFormatEscape = JSON_ESCAPE; finalize_it: + free(tplStr); if(pvals != NULL) cnfparamvalsDestruct(pvals, &pblk); if(iRet != RS_RET_OK) { -- cgit From 231abc9709b30b445a6129dddd1087f30f68bcfe Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Oct 2012 09:33:12 +0200 Subject: fix small memory leak when template is specified in omfile --- tools/omfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/omfile.c b/tools/omfile.c index 1ccd4a56..efdb61a1 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -820,6 +820,7 @@ ENDcreateInstance BEGINfreeInstance CODESTARTfreeInstance + free(pData->tplName); free(pData->f_fname); if(pData->bDynamicName) { dynaFileFreeCache(pData); -- cgit From 5114dc9fa217ac2c8a0d99e714fa42749744fa80 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Oct 2012 09:39:14 +0200 Subject: mention recent changes in ChangeLog --- ChangeLog | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2fbdf8db..b37e3357 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ ---------------------------------------------------------------------------- + --------------------------------------------------------------------------- +Version 7.1.10 [beta] 2012-10-11 + - bugfix: m4 directory was not present in release tarball + - bugfix: small memory leak with string-type templates + - bugfix: small memory leak when template was specified in omfile + --------------------------------------------------------------------------- Version 7.1.9 [beta] 2012-10-09 - bugfix: comments inside objects (e.g. action()) were not properly handled - bugfix: in (non)equal comparisons the position of arrays influenced result -- cgit From 224ec9161337f7ba909cfd093e718e31a8777272 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Oct 2012 10:05:40 +0200 Subject: remove some assert()'s - valgrind does a better job... --- template.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/template.c b/template.c index 89e9a0c8..2fc85e55 100644 --- a/template.c +++ b/template.c @@ -320,10 +320,6 @@ tplToJSON(struct template *pTpl, msg_t *pMsg, struct json_object **pjson) rsRetVal localRet; DEFiRet; - assert(pTpl != NULL); - assert(pMsg != NULL); - assert(json != NULL); - if(pTpl->subtree != NULL){ localRet = jsonFind(pMsg, pTpl->subtree, pjson); if(*pjson == NULL) { -- cgit From b6a66de263945b1d7147bb32aa03cc3c230f2b61 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Oct 2012 10:05:54 +0200 Subject: add missing prototype --- grammar/rainerscript.h | 1 + 1 file changed, 1 insertion(+) diff --git a/grammar/rainerscript.h b/grammar/rainerscript.h index 8ff0d702..5cfce795 100644 --- a/grammar/rainerscript.h +++ b/grammar/rainerscript.h @@ -327,6 +327,7 @@ struct cnfstmt * cnfstmtNewLegaAct(char *actline); struct cnfstmt * cnfstmtNewSet(char *var, struct cnfexpr *expr); struct cnfstmt * cnfstmtNewUnset(char *var); struct cnfstmt * cnfstmtNewCall(es_str_t *name); +struct cnfstmt * cnfstmtNewContinue(void); void cnfstmtDestruct(struct cnfstmt *root); void cnfstmtOptimize(struct cnfstmt *root); struct cnfarray* cnfarrayNew(es_str_t *val); -- cgit