From 11461ad9c6de62556df79a35ff0c4902e2881f57 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 3 Apr 2008 08:47:35 +0000 Subject: bugfix: memory leaks in script engine --- vmop.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vmop.c') diff --git a/vmop.c b/vmop.c index affa83e7..91f84b91 100644 --- a/vmop.c +++ b/vmop.c @@ -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) -- cgit