summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/debug.c6
-rw-r--r--template.c5
-rw-r--r--tools/omfile.c1
3 files changed, 5 insertions, 7 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"
diff --git a/template.c b/template.c
index 8558dd8a..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) {
@@ -1847,6 +1843,7 @@ tplProcessCnf(struct cnfobj *o)
pTpl->optFormatEscape = JSON_ESCAPE;
finalize_it:
+ free(tplStr);
if(pvals != NULL)
cnfparamvalsDestruct(pvals, &pblk);
if(iRet != RS_RET_OK) {
diff --git a/tools/omfile.c b/tools/omfile.c
index 2bb51e99..8969d16d 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -824,6 +824,7 @@ ENDcreateInstance
BEGINfreeInstance
CODESTARTfreeInstance
+ free(pData->tplName);
free(pData->f_fname);
if(pData->bDynamicName) {
dynaFileFreeCache(pData);