svn commit: samba r9349 - in trunk/source/smbwrapper: .
jra at samba.org
jra at samba.org
Wed Aug 17 05:08:36 GMT 2005
Author: jra
Date: 2005-08-17 05:08:35 +0000 (Wed, 17 Aug 2005)
New Revision: 9349
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9349
Log:
Fix direct malloc calls made by smbwrapper.
Jeremy.
Modified:
trunk/source/smbwrapper/smbw_dir.c
Changeset:
Modified: trunk/source/smbwrapper/smbw_dir.c
===================================================================
--- trunk/source/smbwrapper/smbw_dir.c 2005-08-17 03:48:41 UTC (rev 9348)
+++ trunk/source/smbwrapper/smbw_dir.c 2005-08-17 05:08:35 UTC (rev 9349)
@@ -188,7 +188,7 @@
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 @@
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 @@
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--;
More information about the samba-cvs
mailing list