summaryrefslogtreecommitdiff
path: root/source4/ntvfs/cifs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-23 11:13:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:07 -0500
commitaba2ae4784993d1f40ef9295e0f3f11934d9faec (patch)
tree3f44575e811e09bccfc1663a8103892bf7d4bed3 /source4/ntvfs/cifs
parent8b5b6f912a19416c116d0192859e06eeb2c5e6be (diff)
downloadsamba-aba2ae4784993d1f40ef9295e0f3f11934d9faec.tar.gz
samba-aba2ae4784993d1f40ef9295e0f3f11934d9faec.tar.bz2
samba-aba2ae4784993d1f40ef9295e0f3f11934d9faec.zip
r14672: the async_info desctructor needs access to the private struct,
so free async info explicit... I hope to find a generic way later, so that the ntvfs modules doesn't need to take care that much... metze (This used to be commit ba3bf34a850fca52f5d6297315e33df14f62373b)
Diffstat (limited to 'source4/ntvfs/cifs')
-rw-r--r--source4/ntvfs/cifs/vfs_cifs.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c
index 50aa58d6fb..26b9831acc 100644
--- a/source4/ntvfs/cifs/vfs_cifs.c
+++ b/source4/ntvfs/cifs/vfs_cifs.c
@@ -184,6 +184,14 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
static NTSTATUS cvfs_disconnect(struct ntvfs_module_context *ntvfs)
{
struct cvfs_private *private = ntvfs->private_data;
+ struct async_info *a, *an;
+
+ /* first cleanup pending requests */
+ for (a=private->pending; a; a = an) {
+ an = a->next;
+ smbcli_request_destroy(a->c_req);
+ talloc_free(a);
+ }
talloc_free(private);
ntvfs->private_data = NULL;
@@ -211,6 +219,7 @@ static void async_simple(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smbcli_request_simple_recv(c_req);
+ talloc_free(async);
req->async_states->send_fn(req);
}
@@ -268,6 +277,7 @@ static void async_ioctl(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_ioctl_recv(c_req, req, async->parms);
+ talloc_free(async);
req->async_states->send_fn(req);
}
@@ -321,6 +331,7 @@ static void async_qpathinfo(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_pathinfo_recv(c_req, req, async->parms);
+ talloc_free(async);
req->async_states->send_fn(req);
}
@@ -352,6 +363,7 @@ static void async_qfileinfo(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_fileinfo_recv(c_req, req, async->parms);
+ talloc_free(async);
req->async_states->send_fn(req);
}
@@ -405,6 +417,7 @@ static void async_open(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_open_recv(c_req, req, async->parms);
+ talloc_free(async);
req->async_states->send_fn(req);
}
@@ -509,6 +522,7 @@ static void async_read(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_read_recv(c_req, async->parms);
+ talloc_free(async);
req->async_states->send_fn(req);
}
@@ -545,6 +559,7 @@ static void async_write(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_write_recv(c_req, async->parms);
+ talloc_free(async);
req->async_states->send_fn(req);
}
@@ -581,6 +596,7 @@ static void async_seek(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_seek_recv(c_req, async->parms);
+ talloc_free(async);
req->async_states->send_fn(req);
}
@@ -767,6 +783,7 @@ static void async_fsinfo(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_fsinfo_recv(c_req, req, async->parms);
+ talloc_free(async);
req->async_states->send_fn(req);
}
@@ -846,6 +863,7 @@ static void async_trans2(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_trans2_recv(c_req, req, async->parms);
+ talloc_free(async);
req->async_states->send_fn(req);
}
@@ -885,6 +903,7 @@ static void async_changenotify(struct smbcli_request *c_req)
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
req->async_states->status = smb_raw_changenotify_recv(c_req, req, async->parms);
+ talloc_free(async);
req->async_states->send_fn(req);
}