summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_onefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules/vfs_onefs.c')
-rw-r--r--source3/modules/vfs_onefs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/modules/vfs_onefs.c b/source3/modules/vfs_onefs.c
index 865eccdbf5..5f1b99292b 100644
--- a/source3/modules/vfs_onefs.c
+++ b/source3/modules/vfs_onefs.c
@@ -28,15 +28,20 @@
static int onefs_connect(struct vfs_handle_struct *handle, const char *service,
const char *user)
{
- int ret;
+ int ret = SMB_VFS_NEXT_CONNECT(handle, service, user);
+
+ if (ret < 0) {
+ return ret;
+ }
ret = onefs_load_config(handle->conn);
if (ret) {
+ SMB_VFS_NEXT_DISCONNECT(handle);
DEBUG(3, ("Load config failed: %s\n", strerror(errno)));
return ret;
}
- return SMB_VFS_NEXT_CONNECT(handle, service, user);
+ return 0;
}
static int onefs_mkdir(vfs_handle_struct *handle, const char *path,