1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

r9350: Fix direct malloc calls made by smbwrapper.

Jeremy.
This commit is contained in:
Jeremy Allison 2005-08-17 05:09:32 +00:00 committed by Gerald (Jerry) Carter
parent 4936d6d8b2
commit 8bac610239

View File

@ -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--;