From 8303bc49a45d5bab0cdbd4f2d793088f600f715f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 30 Nov 2009 15:53:04 -0800 Subject: Restructure the connect function code to always call down to NEXT-> before initializing. This allows us to do cleanup (by calling DISCONNECT) if initialization fails. Also fix vfs_acl_xattr which was failing to call the NEXT connect function. Jeremy. --- source3/modules/vfs_acl_tdb.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/modules/vfs_acl_tdb.c') diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index db3881e1e7..e9d0f9027a 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -367,12 +367,11 @@ static int connect_acl_tdb(struct vfs_handle_struct *handle, const char *user) { struct db_context *db; - int res; + int ret = SMB_VFS_NEXT_CONNECT(handle, service, user); - res = SMB_VFS_NEXT_CONNECT(handle, service, user); - if (res < 0) { - return res; - } + if (ret < 0) { + return ret; + } if (!acl_tdb_init(&db)) { SMB_VFS_NEXT_DISCONNECT(handle); -- cgit