diff options
Diffstat (limited to 'source/smbd/fileio.c')
-rw-r--r-- | source/smbd/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c index 060fbb124db..a21bd69a36c 100644 --- a/source/smbd/fileio.c +++ b/source/smbd/fileio.c @@ -676,7 +676,7 @@ static BOOL setup_write_cache(files_struct *fsp, SMB_OFF_T file_size) if(alloc_size == 0 || fsp->wcp) return False; - if((wcp = (write_cache *)malloc(sizeof(write_cache))) == NULL) { + if((wcp = SMB_MALLOC_P(write_cache)) == NULL) { DEBUG(0,("setup_write_cache: malloc fail.\n")); return False; } @@ -685,7 +685,7 @@ static BOOL setup_write_cache(files_struct *fsp, SMB_OFF_T file_size) wcp->offset = 0; wcp->alloc_size = alloc_size; wcp->data_size = 0; - if((wcp->data = malloc(wcp->alloc_size)) == NULL) { + if((wcp->data = SMB_MALLOC(wcp->alloc_size)) == NULL) { DEBUG(0,("setup_write_cache: malloc fail for buffer size %u.\n", (unsigned int)wcp->alloc_size )); SAFE_FREE(wcp); |