summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/nsswitch/winbindd_dual.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c
index 05676682f9..67cf6abc2b 100644
--- a/source3/nsswitch/winbindd_dual.c
+++ b/source3/nsswitch/winbindd_dual.c
@@ -468,9 +468,8 @@ static void child_process_request(struct winbindd_domain *domain,
state->response.result = WINBINDD_ERROR;
state->response.length = sizeof(struct winbindd_response);
- state->mem_ctx = talloc_init("winbind request");
- if (state->mem_ctx == NULL)
- return;
+ /* as all requests in the child are sync, we can use talloc_tos() */
+ state->mem_ctx = talloc_tos();
/* Process command */
@@ -488,8 +487,6 @@ static void child_process_request(struct winbindd_domain *domain,
(int)state->request.cmd ));
state->response.result = WINBINDD_ERROR;
}
-
- talloc_destroy(state->mem_ctx);
}
void setup_domain_child(struct winbindd_domain *domain,