2009-07-08 15:39 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/vm/fm.c
    ! fixed reference counter initialization in hb_xrealloc( NULL, size );
This commit is contained in:
Przemyslaw Czerpak
2009-07-08 13:39:49 +00:00
parent 93250d9efe
commit 1fa85b6688
2 changed files with 7 additions and 0 deletions

View File

@@ -17,6 +17,10 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-07-08 15:39 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/fm.c
! fixed reference counter initialization in hb_xrealloc( NULL, size );
2009-07-08 12:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbfnsx/dbfnsx1.c

View File

@@ -667,6 +667,7 @@ void * hb_xrealloc( void * pMem, ULONG ulSize ) /* reallocates memory */
pMem = malloc( HB_ALLOC_SIZE( ulSize ) );
if( pMem )
{
HB_ATOM_SET( HB_COUNTER_PTR( HB_MEM_PTR( pMem ) ), 1 );
if( ulSize > ulMemSize )
{
memcpy( pMem, pMemBlock, HB_ALLOC_SIZE( ulMemSize ) );
@@ -715,6 +716,8 @@ void * hb_xrealloc( void * pMem, ULONG ulSize ) /* reallocates memory */
if( ulSize == 0 )
hb_errInternal( HB_EI_XREALLOCNULLSIZE, NULL, NULL, NULL );
pMem = malloc( HB_ALLOC_SIZE( ulSize ) );
if( pMem )
HB_ATOM_SET( HB_COUNTER_PTR( HB_MEM_PTR( pMem ) ), 1 );
}
else if( ulSize == 0 )
{