summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-05-14 15:43:10 +0200
committerVolker Lendecke <vl@samba.org>2013-05-14 18:11:29 +0200
commit5868accc71e15e27aef6fb74036a3f1f439200b8 (patch)
treeb654c6ef47581848ed9cf43a8999e6a29d43ff08 /source3
parent6c5158e3de26cd6e911f740a1c36789d77ea1c70 (diff)
downloadsamba-5868accc71e15e27aef6fb74036a3f1f439200b8.tar.gz
samba-5868accc71e15e27aef6fb74036a3f1f439200b8.tar.bz2
samba-5868accc71e15e27aef6fb74036a3f1f439200b8.zip
vfs_gpfs: slightly simplify connect()
DISCONNECT can be arbitrarily complex, TALLOC_FREE of a simple struct is easier. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue May 14 18:11:29 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_gpfs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 7f00eac5f6..13061c8c35 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1691,19 +1691,19 @@ static int vfs_gpfs_connect(struct vfs_handle_struct *handle,
smbd_gpfs_lib_init();
- ret = SMB_VFS_NEXT_CONNECT(handle, service, user);
-
- if (ret < 0) {
- return ret;
- }
-
config = talloc_zero(handle->conn, struct gpfs_config_data);
if (!config) {
- SMB_VFS_NEXT_DISCONNECT(handle);
DEBUG(0, ("talloc_zero() failed\n"));
+ errno = ENOMEM;
return -1;
}
+ ret = SMB_VFS_NEXT_CONNECT(handle, service, user);
+ if (ret < 0) {
+ TALLOC_FREE(config);
+ return ret;
+ }
+
config->sharemodes = lp_parm_bool(SNUM(handle->conn), "gpfs",
"sharemodes", true);