diff options
| author | Andreas Schneider <asn@samba.org> | 2013-11-04 12:32:04 +0100 |
|---|---|---|
| committer | David Disseldorp <ddiss@samba.org> | 2013-11-04 15:04:18 +0100 |
| commit | 25d62dda5c64aefeab0059d9437756f8aaec5397 (patch) | |
| tree | 44610b24dfd8845fcc49bab247f8fb942a1d4278 /source3/modules | |
| parent | e2d6431cd4d3dee6a777e6c1063b42b8a0fa0cef (diff) | |
| download | samba-25d62dda5c64aefeab0059d9437756f8aaec5397.tar.gz samba-25d62dda5c64aefeab0059d9437756f8aaec5397.tar.xz samba-25d62dda5c64aefeab0059d9437756f8aaec5397.zip | |
vfs: Fix building the glusterfs module.
Using calloc directly throws an error. This fixes building the glusterfs
module.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Diffstat (limited to 'source3/modules')
| -rw-r--r-- | source3/modules/vfs_glusterfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 237236a1df..c944276d57 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -707,12 +707,12 @@ static char *vfs_gluster_getwd(struct vfs_handle_struct *handle) char *cwd; char *ret; - cwd = calloc(1, PATH_MAX + 1); + cwd = SMB_CALLOC_ARRAY(char, PATH_MAX); if (cwd == NULL) { return NULL; } - ret = glfs_getcwd(handle->data, cwd, PATH_MAX); + ret = glfs_getcwd(handle->data, cwd, PATH_MAX - 1); if (ret == 0) { free(cwd); } |
