NTSTATUS status;
uint8_t *rcvbuf;
+ /* We must free subreq in this function as there is
+ a timer event attached to it. */
+
status = cli_read_andx_recv(subreq, &state->received, &rcvbuf);
/*
* We can't TALLOC_FREE(subreq) as usual here, as rcvbuf still is a
}
memcpy(state->data, rcvbuf, state->received);
+ TALLOC_FREE(subreq);
async_req_done(req);
}
req->private_data, struct rpc_sock_read_state);
int err;
+ /* We must free subreq in this function as there is
+ a timer event attached to it. */
+
state->received = async_recv_recv(subreq, &err);
+
if (state->received == -1) {
+ TALLOC_FREE(subreq);
async_req_nterror(req, map_nt_error_from_unix(err));
return;
}
+ TALLOC_FREE(subreq);
async_req_done(req);
}
req->private_data, struct rpc_sock_write_state);
int err;
+ /* We must free subreq in this function as there is
+ a timer event attached to it. */
+
state->sent = async_send_recv(subreq, &err);
+
if (state->sent == -1) {
+ TALLOC_FREE(subreq);
async_req_nterror(req, map_nt_error_from_unix(err));
return;
}
+ TALLOC_FREE(subreq);
async_req_done(req);
}