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
return NT_STATUS_OK;
}
+
+static void free_request(struct smbcli_request *req)
+{
+ talloc_free(req);
+}
+
/*
shutdown SMB pipe connection
*/
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);
return NT_STATUS_OK;
}
+static void free_request(struct smb2_request *req)
+{
+ talloc_free(req);
+}
+
/*
shutdown SMB pipe connection
*/
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);