diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-03 08:47:35 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-03 08:47:35 +0000 |
commit | 11461ad9c6de62556df79a35ff0c4902e2881f57 (patch) | |
tree | bcebd3205f213ddd4a9ae5218d40bbe0f16b965f /vmop.c | |
parent | 2be9977a4db263400c8ba56c82e576b7da42cd86 (diff) | |
download | rsyslog-11461ad9c6de62556df79a35ff0c4902e2881f57.tar.gz rsyslog-11461ad9c6de62556df79a35ff0c4902e2881f57.tar.xz rsyslog-11461ad9c6de62556df79a35ff0c4902e2881f57.zip |
bugfix: memory leaks in script engine
Diffstat (limited to 'vmop.c')
-rw-r--r-- | vmop.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -59,6 +59,12 @@ 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); + } ENDobjDestruct(vmop) |