diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-01-25 12:19:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:51:28 -0500 |
commit | 5497dfe64ad810a2a3fb22da6869d311894bfed0 (patch) | |
tree | c5169e11cb732756fa39307c05a9dfc5a2374ff5 /source4 | |
parent | 60954d80e1afd0527a5fa426bf02e9359ed19890 (diff) | |
download | samba-5497dfe64ad810a2a3fb22da6869d311894bfed0.tar.gz samba-5497dfe64ad810a2a3fb22da6869d311894bfed0.tar.bz2 samba-5497dfe64ad810a2a3fb22da6869d311894bfed0.zip |
r13129: fix the memory hierachie
metze
(This used to be commit 19205b8d89d3d7e99a65938f59412e0c4e8ac5fe)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/ntvfs/cifs/vfs_cifs.c | 3 | ||||
-rw-r--r-- | source4/ntvfs/ipc/vfs_ipc.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/nbench/vfs_nbench.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/simple/vfs_simple.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/unixuid/vfs_unixuid.c | 3 |
5 files changed, 8 insertions, 6 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 412af07aa2..138c9d566f 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -93,7 +93,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, machine_account = lp_parm_bool(req->tcon->service, "cifs", "use_machine_account", False); - private = talloc(req->tcon, struct cvfs_private); + private = talloc(ntvfs, struct cvfs_private); if (!private) { return NT_STATUS_NO_MEMORY; } @@ -178,6 +178,7 @@ static NTSTATUS cvfs_disconnect(struct ntvfs_module_context *ntvfs, struct cvfs_private *private = ntvfs->private_data; talloc_free(private); + ntvfs->private_data = NULL; return NT_STATUS_OK; } diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index 7eb9250eb2..dd7994c1fb 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -87,7 +87,7 @@ static NTSTATUS ipc_connect(struct ntvfs_module_context *ntvfs, NT_STATUS_HAVE_NO_MEMORY(tcon->dev_type); /* prepare the private state for this connection */ - private = talloc(tcon, struct ipc_private); + private = talloc(ntvfs, struct ipc_private); NT_STATUS_HAVE_NO_MEMORY(private); ntvfs->private_data = private; diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c index 3c95621694..e88adbafcc 100644 --- a/source4/ntvfs/nbench/vfs_nbench.c +++ b/source4/ntvfs/nbench/vfs_nbench.c @@ -99,7 +99,7 @@ static NTSTATUS nbench_connect(struct ntvfs_module_context *ntvfs, NTSTATUS status; char *logname = NULL; - nprivates = talloc(req->tcon, struct nbench_private); + nprivates = talloc(ntvfs, struct nbench_private); if (!nprivates) { return NT_STATUS_NO_MEMORY; } diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c index 1198cafbe9..ad06a95041 100644 --- a/source4/ntvfs/simple/vfs_simple.c +++ b/source4/ntvfs/simple/vfs_simple.c @@ -54,10 +54,10 @@ static NTSTATUS svfs_connect(struct ntvfs_module_context *ntvfs, struct smbsrv_tcon *tcon = req->tcon; struct svfs_private *private; - private = talloc(tcon, struct svfs_private); + private = talloc(ntvfs, struct svfs_private); private->next_search_handle = 0; - private->connectpath = talloc_strdup(tcon, lp_pathname(tcon->service)); + private->connectpath = talloc_strdup(private, lp_pathname(tcon->service)); private->open_files = NULL; private->search = NULL; diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c index 886ace819e..df627bd2d1 100644 --- a/source4/ntvfs/unixuid/vfs_unixuid.c +++ b/source4/ntvfs/unixuid/vfs_unixuid.c @@ -207,7 +207,7 @@ static NTSTATUS unixuid_connect(struct ntvfs_module_context *ntvfs, struct unixuid_private *private; NTSTATUS status; - private = talloc(req->tcon, struct unixuid_private); + private = talloc(ntvfs, struct unixuid_private); if (!private) { return NT_STATUS_NO_MEMORY; } @@ -239,6 +239,7 @@ static NTSTATUS unixuid_disconnect(struct ntvfs_module_context *ntvfs, NTSTATUS status; talloc_free(private); + ntvfs->private_data = NULL; status = ntvfs_next_disconnect(ntvfs, tcon); |