summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-07-01 13:59:52 +1000
committerAndrew Tridgell <tridge@samba.org>2009-07-01 15:15:36 +1000
commit9faa0745e9598a9096a7c69c30c273b47393e819 (patch)
tree6f89d59af74f3bd3277fb8420c5eecc776fe1a08 /source4/librpc
parentb31f1e6d5bffddf5eb8df940bc4ff19f8bb5a7c4 (diff)
downloadsamba-9faa0745e9598a9096a7c69c30c273b47393e819.tar.gz
samba-9faa0745e9598a9096a7c69c30c273b47393e819.tar.bz2
samba-9faa0745e9598a9096a7c69c30c273b47393e819.zip
fixed rpc smb code to not reply on talloc_free being a function pointer
The upcoming talloc_free/talloc_reference changes change talloc_free to be a macro. These two bits of code relied on it being a function pointer
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc_smb.c8
-rw-r--r--source4/librpc/rpc/dcerpc_smb2.c7
2 files changed, 13 insertions, 2 deletions
diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c
index 013a8578e6..8b221747ac 100644
--- a/source4/librpc/rpc/dcerpc_smb.c
+++ b/source4/librpc/rpc/dcerpc_smb.c
@@ -360,6 +360,12 @@ static NTSTATUS smb_send_request(struct dcerpc_connection *c, DATA_BLOB *blob,
return NT_STATUS_OK;
}
+
+static void free_request(struct smbcli_request *req)
+{
+ talloc_free(req);
+}
+
/*
shutdown SMB pipe connection
*/
@@ -378,7 +384,7 @@ static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status)
req = smb_raw_close_send(smb->tree, &io);
if (req != NULL) {
/* we don't care if this fails, so just free it if it succeeds */
- req->async.fn = (void (*)(struct smbcli_request *))talloc_free;
+ req->async.fn = free_request;
}
talloc_free(smb);
diff --git a/source4/librpc/rpc/dcerpc_smb2.c b/source4/librpc/rpc/dcerpc_smb2.c
index e4933652f4..fbd847680f 100644
--- a/source4/librpc/rpc/dcerpc_smb2.c
+++ b/source4/librpc/rpc/dcerpc_smb2.c
@@ -324,6 +324,11 @@ static NTSTATUS smb2_send_request(struct dcerpc_connection *c, DATA_BLOB *blob,
return NT_STATUS_OK;
}
+static void free_request(struct smb2_request *req)
+{
+ talloc_free(req);
+}
+
/*
shutdown SMB pipe connection
*/
@@ -341,7 +346,7 @@ static NTSTATUS smb2_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status)
req = smb2_close_send(smb->tree, &io);
if (req != NULL) {
/* we don't care if this fails, so just free it if it succeeds */
- req->async.fn = (void (*)(struct smb2_request *))talloc_free;
+ req->async.fn = free_request;
}
talloc_free(smb);