summaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-03 08:48:25 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-03 08:48:25 +0000
commitf1c9f5da133f4c6c8b52c5948cc0f61e32c210f1 (patch)
tree0fa2a1cb256578ea1492724d0b771630e2ecf762 /vm.c
parentbaf9a567599ada3da4b14f913fa4b10d0aabf03c (diff)
downloadrsyslog-f1c9f5da133f4c6c8b52c5948cc0f61e32c210f1.tar.gz
rsyslog-f1c9f5da133f4c6c8b52c5948cc0f61e32c210f1.tar.xz
rsyslog-f1c9f5da133f4c6c8b52c5948cc0f61e32c210f1.zip
bugfix: memory leaks in script engine
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/vm.c b/vm.c
index 3cd05622..a26e4331 100644
--- a/vm.c
+++ b/vm.c
@@ -109,8 +109,6 @@ BEGINop(name) \
number_t bRes; \
CODESTARTop(name) \
CHKiRet(vmstk.Pop2CommOp(pThis->pStk, &operand1, &operand2)); \
-var.DebugPrint(operand1); \
-var.DebugPrint(operand2); \
/* data types are equal (so we look only at operand1), but we must \
* check which type we have to deal with... \
*/ \
@@ -122,7 +120,6 @@ var.DebugPrint(operand2); \
} \
\
/* we have a result, so let's push it */ \
-RUNLOG_VAR("%lld", bRes); \
var.SetNumber(operand1, bRes); \
vmstk.Push(pThis->pStk, operand1); /* result */ \
var.Destruct(&operand2); /* no longer needed */ \
@@ -374,6 +371,8 @@ BEGINobjDestruct(vm) /* be sure to specify the object type also in END and CODES
CODESTARTobjDestruct(vm)
if(pThis->pStk != NULL)
vmstk.Destruct(&pThis->pStk);
+ if(pThis->pMsg != NULL)
+ msgDestruct(&pThis->pMsg);
ENDobjDestruct(vm)