diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-03-13 12:52:53 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-03-13 12:52:53 +0100 |
commit | 2bb202f665df594286595e226251b3580b474a4d (patch) | |
tree | f2287bb7a0e44472a7273f80c421b9465aaae0f3 /runtime | |
parent | cdc8cf8d55f519066445ce3f9e899d092824a98e (diff) | |
download | rsyslog-2bb202f665df594286595e226251b3580b474a4d.tar.gz rsyslog-2bb202f665df594286595e226251b3580b474a4d.tar.xz rsyslog-2bb202f665df594286595e226251b3580b474a4d.zip |
bugfix: removed (newly introduced) memory leaks
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/vm.c | 1 | ||||
-rw-r--r-- | runtime/vmop.c | 8 |
2 files changed, 3 insertions, 6 deletions
diff --git a/runtime/vm.c b/runtime/vm.c index 113a9d59..a25476c2 100644 --- a/runtime/vm.c +++ b/runtime/vm.c @@ -354,6 +354,7 @@ RUNLOG_VAR("%d", iStrlen); } else ABORT_FINALIZE(RS_RET_INVLD_FUNC); PUSHRESULTop(operand1, iStrlen); // TODO: dummy, FIXME + var.Destruct(&numOperands); /* no longer needed */ finalize_it: ENDop(FUNC_CALL) diff --git a/runtime/vmop.c b/runtime/vmop.c index 441dae6c..a343481e 100644 --- a/runtime/vmop.c +++ b/runtime/vmop.c @@ -61,12 +61,8 @@ rsRetVal vmopConstructFinalize(vmop_t __attribute__((unused)) *pThis) /* destructor for the vmop object */ BEGINobjDestruct(vmop) /* be sure to specify the object type also in END and CODESTART macros! */ CODESTARTobjDestruct(vmop) - if( pThis->opcode == opcode_PUSHSYSVAR - || pThis->opcode == opcode_PUSHMSGVAR - || pThis->opcode == opcode_PUSHCONSTANT) { - if(pThis->operand.pVar != NULL) - var.Destruct(&pThis->operand.pVar); - } + if(pThis->operand.pVar != NULL) + var.Destruct(&pThis->operand.pVar); ENDobjDestruct(vmop) |