summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/vfs_posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/posix/vfs_posix.c')
-rw-r--r--source4/ntvfs/posix/vfs_posix.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index e989f8de67..8aa028919c 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -61,11 +61,10 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
char *base_directory;
NTSTATUS status;
- pvfs = talloc_p(tcon, struct pvfs_state);
+ pvfs = talloc_zero_p(tcon, struct pvfs_state);
if (pvfs == NULL) {
return NT_STATUS_NO_MEMORY;
}
- ZERO_STRUCTP(pvfs);
/* for simplicity of path construction, remove any trailing slash now */
base_directory = talloc_strdup(pvfs, lp_pathname(tcon->service));
@@ -95,6 +94,18 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
+ /* allocate the fnum id -> ptr tree */
+ pvfs->idtree_fnum = idr_init(pvfs);
+ if (pvfs->idtree_fnum == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ /* allocate the search handle -> ptr tree */
+ pvfs->idtree_search = idr_init(pvfs);
+ if (pvfs->idtree_search == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
status = pvfs_mangle_init(pvfs);
if (!NT_STATUS_IS_OK(status)) {
return status;