diff options
author | Jeremy Allison <jra@samba.org> | 2017-05-11 15:45:57 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2017-05-13 16:50:13 +0200 |
commit | e1b4df414f9e6689589eb247f99bb20742a4cefc (patch) | |
tree | 522b97745d4c940218b9730c973fec89619fd06e /source4/ntvfs | |
parent | 91852dd0816a745f501b765a556b5985521c8119 (diff) | |
download | samba-e1b4df414f9e6689589eb247f99bb20742a4cefc.tar.gz |
s4: ntvfs: Add a TALLOC_CTX * paramter to pvfs_acl_register()
Make use of the passed in TALLOC_CTX * from the init function
to remove a talloc_autofree_context() use.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl.c | 5 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl_nfs4.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl_xattr.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index 9a110caf236..d284585f260 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -41,7 +41,7 @@ static int num_backends; The 'name' can be later used by other backends to find the operations structure for this backend. */ -NTSTATUS pvfs_acl_register(const struct pvfs_acl_ops *ops) +NTSTATUS pvfs_acl_register(TALLOC_CTX *ctx, const struct pvfs_acl_ops *ops) { struct pvfs_acl_ops *new_ops; @@ -50,7 +50,8 @@ NTSTATUS pvfs_acl_register(const struct pvfs_acl_ops *ops) return NT_STATUS_OBJECT_NAME_COLLISION; } - backends = talloc_realloc(talloc_autofree_context(), backends, struct pvfs_acl_backend, num_backends+1); + backends = talloc_realloc(ctx, backends, + struct pvfs_acl_backend, num_backends+1); NT_STATUS_HAVE_NO_MEMORY(backends); new_ops = (struct pvfs_acl_ops *)talloc_memdup(backends, ops, sizeof(*ops)); diff --git a/source4/ntvfs/posix/pvfs_acl_nfs4.c b/source4/ntvfs/posix/pvfs_acl_nfs4.c index 392dc92fe12..b07d2ba9b41 100644 --- a/source4/ntvfs/posix/pvfs_acl_nfs4.c +++ b/source4/ntvfs/posix/pvfs_acl_nfs4.c @@ -195,5 +195,5 @@ NTSTATUS pvfs_acl_nfs4_init(TALLOC_CTX *ctx) .acl_load = pvfs_acl_load_nfs4, .acl_save = pvfs_acl_save_nfs4 }; - return pvfs_acl_register(&ops); + return pvfs_acl_register(ctx, &ops); } diff --git a/source4/ntvfs/posix/pvfs_acl_xattr.c b/source4/ntvfs/posix/pvfs_acl_xattr.c index 648c459dadd..1f569ca43f3 100644 --- a/source4/ntvfs/posix/pvfs_acl_xattr.c +++ b/source4/ntvfs/posix/pvfs_acl_xattr.c @@ -100,5 +100,5 @@ NTSTATUS pvfs_acl_xattr_init(TALLOC_CTX *ctx) .acl_load = pvfs_acl_load_xattr, .acl_save = pvfs_acl_save_xattr }; - return pvfs_acl_register(&ops); + return pvfs_acl_register(ctx, &ops); } |