struct wb_domain_request_state {
struct tevent_context *ev;
+ /*
+ * Note we use a plain
+ * struct winbindd_domain pointer
+ * instead of struct winbindd_domain_ref
+ * here, because we're protected by
+ * queue_entry that the domain
+ * is not free'd.
+ *
+ * This also makes sure
+ * struct winbindd_child *child
+ * does not be come invalid.
+ */
struct tevent_queue_entry *queue_entry;
- struct winbindd_domain *domain;
+ struct winbindd_domain *domain; /* no ref needed */
struct winbindd_child *child;
struct winbindd_request *request;
struct winbindd_request *init_req;
* and give the next one in the queue the chance
* to check for an idle child.
*/
+ state->child = NULL;
TALLOC_FREE(state->pending_subreq);
+ if (state->domain != NULL) {
+ tevent_queue_start(state->domain->queue);
+ state->domain = NULL;
+ }
TALLOC_FREE(state->queue_entry);
- tevent_queue_start(state->domain->queue);
}
static void wb_domain_request_trigger(struct tevent_req *req,
* and give the next one in the queue the chance
* to check for an idle child.
*/
+ state->child = NULL;
+ tevent_queue_start(state->domain->queue);
+ state->domain = NULL;
TALLOC_FREE(state->queue_entry);
return;
}
* and give the next one in the queue the chance
* to check for an idle child.
*/
+ state->child = NULL;
+ tevent_queue_start(state->domain->queue);
+ state->domain = NULL;
TALLOC_FREE(state->queue_entry);
}