diff options
author | Jeremy Allison <jra@samba.org> | 2011-05-31 16:36:06 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-06-01 04:06:12 +0200 |
commit | c7d2f6d35a95678c91faf0b5ac7f83bc5d1abfde (patch) | |
tree | 21939b3dee3e786c9ec4c00eb6b832f2560bd371 /source3/torture | |
parent | 1cee71713f75dbee653ea86bd4e7c87efe677cf6 (diff) | |
download | samba-c7d2f6d35a95678c91faf0b5ac7f83bc5d1abfde.tar.gz samba-c7d2f6d35a95678c91faf0b5ac7f83bc5d1abfde.tar.bz2 samba-c7d2f6d35a95678c91faf0b5ac7f83bc5d1abfde.zip |
Remove the char * argument from the SMB_VFS_GETWD() call. Now always
returns malloc'ed memory.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jun 1 04:06:12 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/cmd_vfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c index 2c3a416002..c73bf6f36b 100644 --- a/source3/torture/cmd_vfs.c +++ b/source3/torture/cmd_vfs.c @@ -889,13 +889,14 @@ static NTSTATUS cmd_fchown(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, static NTSTATUS cmd_getwd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv) { - char buf[PATH_MAX]; - if (SMB_VFS_GETWD(vfs->conn, buf) == NULL) { + char *buf = SMB_VFS_GETWD(vfs->conn); + if (buf == NULL) { printf("getwd: error=%d (%s)\n", errno, strerror(errno)); return NT_STATUS_UNSUCCESSFUL; } printf("getwd: %s\n", buf); + SAFE_FREE(buf); return NT_STATUS_OK; } |