From 362ee10c2087ad1af2aeb263f9ad51cb71c4af67 Mon Sep 17 00:00:00 2001 From: Eddie Runia Date: Fri, 14 May 1999 18:51:07 +0000 Subject: [PATCH] See changelog --- harbour/ChangeLog | 4 ++++ harbour/source/rtl/codebloc.c | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1bf4dd9c84..4cbe660e18 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +19990514-19:50 CET Eddie Runia + * source/rtl/codebloc.c + Codeblock patch from Ryszard applied + 19990514-19:45 CET Eddie Runia * source/rtl/arrays.c Patch from David (see below) was overwritten ?? diff --git a/harbour/source/rtl/codebloc.c b/harbour/source/rtl/codebloc.c index 6da7272467..ab0158cb25 100644 --- a/harbour/source/rtl/codebloc.c +++ b/harbour/source/rtl/codebloc.c @@ -99,8 +99,13 @@ void CodeblockDelete( PCODEBLOCK pCBlock ) /* free space allocated for local variables */ - while( w < pCBlock->wLocals ) - ItemRelease( &pCBlock->pItems[ w++ ] ); + if( pCBlock->pItems ) + { + while( w < pCBlock->wLocals ) + ItemRelease( &pCBlock->pItems[ w++ ] ); + _xfree( pCBlock->pItems ); + } + /* free space allocated for a CODEBLOCK structure */ _xfree( pCBlock );