summaryrefslogtreecommitdiff
path: root/source3/smbwrapper
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-08-17 05:09:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:33 -0500
commit9357e6c85efd06e90d479cd652c5e8e56d5b07fe (patch)
treed3628366fa1d2578a1074800cf5cb6950c225d9e /source3/smbwrapper
parentb2bfa0c775a321764c6c58e07d8ad2ac0763eec0 (diff)
downloadsamba-9357e6c85efd06e90d479cd652c5e8e56d5b07fe.tar.gz
samba-9357e6c85efd06e90d479cd652c5e8e56d5b07fe.tar.bz2
samba-9357e6c85efd06e90d479cd652c5e8e56d5b07fe.zip
r9350: Fix direct malloc calls made by smbwrapper.
Jeremy. (This used to be commit 8bac610239e97ebdbd63dfb175001b69bcb27b18)
Diffstat (limited to 'source3/smbwrapper')
-rw-r--r--source3/smbwrapper/smbw_dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbwrapper/smbw_dir.c b/source3/smbwrapper/smbw_dir.c
index 0a6deede41..a89af54e1a 100644
--- a/source3/smbwrapper/smbw_dir.c
+++ b/source3/smbwrapper/smbw_dir.c
@@ -188,7 +188,7 @@ int smbw_dir_open(const char *fname)
goto failed;
}
- dir = (struct smbw_dir *)malloc(sizeof(*dir));
+ dir = SMB_MALLOC_P(struct smbw_dir);
if (!dir) {
errno = ENOMEM;
goto failed;
@@ -265,7 +265,7 @@ int smbw_dir_open(const char *fname)
dir->fd = fd;
dir->srv = srv;
- dir->path = strdup(s);
+ dir->path = SMB_STRDUP(s);
DEBUG(4,(" -> %d\n", dir->count));
@@ -578,7 +578,7 @@ char *smbw_getcwd(char *buf, size_t size)
if (!buf) {
if (size <= 0) size = strlen(smbw_cwd)+1;
- buf = (char *)malloc(size);
+ buf = SMB_MALLOC_ARRAY(char, size);
if (!buf) {
errno = ENOMEM;
smbw_busy--;