diff options
author | Jeremy Allison <jra@samba.org> | 2004-12-07 18:25:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:32 -0500 |
commit | acf9d61421faa6c0055d57fdee7db300dc5431aa (patch) | |
tree | 5482afecfe9b4a68b9a1f18d541a3109f8143ab7 /source3/param/params.c | |
parent | 3bd3be97dc8a581c0502410453091c195e322766 (diff) | |
download | samba-acf9d61421faa6c0055d57fdee7db300dc5431aa.tar.gz samba-acf9d61421faa6c0055d57fdee7db300dc5431aa.tar.bz2 samba-acf9d61421faa6c0055d57fdee7db300dc5431aa.zip |
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)
Diffstat (limited to 'source3/param/params.c')
-rw-r--r-- | source3/param/params.c | 10 |
1 files changed, 5 insertions, 5 deletions
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)); |