diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-03 08:48:25 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-03 08:48:25 +0000 |
commit | f1c9f5da133f4c6c8b52c5948cc0f61e32c210f1 (patch) | |
tree | 0fa2a1cb256578ea1492724d0b771630e2ecf762 /vmop.c | |
parent | baf9a567599ada3da4b14f913fa4b10d0aabf03c (diff) | |
download | rsyslog-f1c9f5da133f4c6c8b52c5948cc0f61e32c210f1.tar.gz rsyslog-f1c9f5da133f4c6c8b52c5948cc0f61e32c210f1.tar.xz rsyslog-f1c9f5da133f4c6c8b52c5948cc0f61e32c210f1.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) |