git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2bfa0c
)
r9350: Fix direct malloc calls made by smbwrapper.
author
Jeremy Allison
<jra@samba.org>
Wed, 17 Aug 2005 05:09:32 +0000
(
05:09
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:00:33 +0000
(11:00 -0500)
Jeremy.
(This used to be commit
8bac610239e97ebdbd63dfb175001b69bcb27b18
)
source3/smbwrapper/smbw_dir.c
patch
|
blob
|
history
diff --git
a/source3/smbwrapper/smbw_dir.c
b/source3/smbwrapper/smbw_dir.c
index 0a6deede41ff170ca349d49e5d5c4f70714dbc36..a89af54e1a335a6f9186d457a50af25977b326c0 100644
(file)
--- 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--;