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/locking/locking.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/locking/locking.c')
-rw-r--r-- | source3/locking/locking.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c index d4e8c493d5..b2f30a5684 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -679,7 +679,7 @@ BOOL set_share_mode(files_struct *fsp, uint16 port, uint16 op_type) pstrcat(fname, fsp->fsp_name); size = sizeof(*data) + sizeof(share_mode_entry) + strlen(fname) + 1; - p = (char *)malloc(size); + p = (char *)SMB_MALLOC(size); if (!p) return False; data = (struct locking_data *)p; @@ -711,7 +711,7 @@ BOOL set_share_mode(files_struct *fsp, uint16 port, uint16 op_type) fsp->fsp_name, data->u.num_share_mode_entries )); size = dbuf.dsize + sizeof(share_mode_entry); - p = malloc(size); + p = SMB_MALLOC(size); if (!p) { SAFE_FREE(dbuf.dptr); return False; @@ -1161,7 +1161,7 @@ BOOL add_deferred_open(uint16 mid, struct timeval *ptv, SMB_DEV_T dev, SMB_INO_T /* we'll need to create a new record */ size = sizeof(*data) + sizeof(deferred_open_entry) + strlen(fname) + 1; - p = (char *)malloc(size); + p = (char *)SMB_MALLOC(size); if (!p) return False; data = (struct deferred_open_data *)p; @@ -1193,7 +1193,7 @@ BOOL add_deferred_open(uint16 mid, struct timeval *ptv, SMB_DEV_T dev, SMB_INO_T fname, data->u.num_deferred_open_entries )); size = dbuf.dsize + sizeof(deferred_open_entry); - p = malloc(size); + p = SMB_MALLOC(size); if (!p) { SAFE_FREE(dbuf.dptr); return False; |