From acf9d61421faa6c0055d57fdee7db300dc5431aa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 7 Dec 2004 18:25:53 +0000 Subject: r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a) --- source3/param/params.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/param/params.c') diff --git a/source3/param/params.c b/source3/param/params.c index 892e5476cc..2d6fe56716 100644 --- a/source3/param/params.c +++ b/source3/param/params.c @@ -238,7 +238,7 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(const char *) ) { char *tb; - tb = Realloc( bufr, bSize +BUFR_INC ); + tb = SMB_REALLOC( bufr, bSize +BUFR_INC ); if( NULL == tb ) { DEBUG(0, ("%s Memory re-allocation failure.", func) ); @@ -335,7 +335,7 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *) { char *tb; - tb = Realloc( bufr, bSize + BUFR_INC ); + tb = SMB_REALLOC( bufr, bSize + BUFR_INC ); if( NULL == tb ) { DEBUG(0, ("%s Memory re-allocation failure.", func) ); @@ -403,7 +403,7 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *) { char *tb; - tb = Realloc( bufr, bSize + BUFR_INC ); + tb = SMB_REALLOC( bufr, bSize + BUFR_INC ); if( NULL == tb ) { DEBUG(0, ("%s Memory re-allocation failure.", func) ); @@ -521,7 +521,7 @@ static myFILE *OpenConfFile( const char *FileName ) int lvl = in_client?1:0; myFILE *ret; - ret = (myFILE *)malloc(sizeof(*ret)); + ret = SMB_MALLOC_P(myFILE); if (!ret) return NULL; ret->buf = file_load(FileName, &ret->size); @@ -572,7 +572,7 @@ BOOL pm_process( const char *FileName, else /* If we don't have a buffer */ { /* allocate one, then parse, */ bSize = BUFR_INC; /* then free. */ - bufr = (char *)malloc( bSize ); + bufr = (char *)SMB_MALLOC( bSize ); if( NULL == bufr ) { DEBUG(0,("%s memory allocation failure.\n", func)); -- cgit