summaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-03 08:47:35 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-03 08:47:35 +0000
commit11461ad9c6de62556df79a35ff0c4902e2881f57 (patch)
treebcebd3205f213ddd4a9ae5218d40bbe0f16b965f /vm.c
parent2be9977a4db263400c8ba56c82e576b7da42cd86 (diff)
downloadrsyslog-11461ad9c6de62556df79a35ff0c4902e2881f57.tar.gz
rsyslog-11461ad9c6de62556df79a35ff0c4902e2881f57.tar.bz2
rsyslog-11461ad9c6de62556df79a35ff0c4902e2881f57.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)