summaryrefslogtreecommitdiff
path: root/source/smbwrapper/smbw_dir.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-09-22 01:21:12 +0000
committerGerald Carter <jerry@samba.org>2005-09-22 01:21:12 +0000
commitd826a6a9b1bb26565fe75781dddac782a4757e90 (patch)
treea0856da45373abedef604417f83489148dcf334e /source/smbwrapper/smbw_dir.c
parent7a42b3de7aea0f8afefefd90db7fe8f255163589 (diff)
downloadsamba-3.0.20rc2.tar.gz
r10400: commit merge patch from jrasamba-3.0.20rc2
libsmbsharemodes added (Jermey). Linux core dump fix from (James Peach). Linux quota fixes from (metze). krb5 memory leaks from (gd). Creds fix for winbindd and server (Jeremy). winbindd recursion fix (Jeremy). winbindd builtin fix (gd) universal pw error fixes (novell). dir logic fix (Jeremy). hide dotfiles fix (Jeremy) no write to read-only shares fix (?). exclusive open fix (vl). tdb reopen fix (tridge) status display open files fix (Jeremy) posix acl null pointer crash (?) posix acl mem leak (?) mount.cifs flag fix (sfrench) smbspool error message fix (?) libsmbclient comment fix (?). 64-bit error message fixes (Jeremy).
Diffstat (limited to 'source/smbwrapper/smbw_dir.c')
-rw-r--r--source/smbwrapper/smbw_dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/smbwrapper/smbw_dir.c b/source/smbwrapper/smbw_dir.c
index 0a6deede41f..a89af54e1a3 100644
--- a/source/smbwrapper/smbw_dir.c
+++ b/source/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--;