summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-07-26 20:20:50 +0200
committerVolker Lendecke <vl@samba.org>2009-07-27 16:15:54 +0200
commite30509f037098feac8345f39524902061712039f (patch)
tree42a0092be00f2478fb376c5dba2f3a51a9a69c5c /source3/winbindd
parentcdd7a5208fbcb65e4a75ee08f8f015530f418c15 (diff)
downloadsamba-e30509f037098feac8345f39524902061712039f.tar.gz
samba-e30509f037098feac8345f39524902061712039f.tar.bz2
samba-e30509f037098feac8345f39524902061712039f.zip
Fix a valgrind error in winbind
When looking for idle clients, we dereferenced state->response. As this is dynamically allocated now, the proper test is whether state->response exists at all. This is the case when an async operation is in process at that moment.
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 49faae116a..6863e93415 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -664,6 +664,7 @@ static void winbind_client_response_written(struct tevent_req *req)
}
TALLOC_FREE(state->mem_ctx);
+ state->response = NULL;
req = wb_req_read_send(state, winbind_event_context(), state->sock,
WINBINDD_MAX_EXTRA_DATA);
@@ -816,7 +817,7 @@ static bool remove_idle_client(void)
int nidle = 0;
for (state = winbindd_client_list(); state; state = state->next) {
- if (state->response->result != WINBINDD_PENDING &&
+ if (state->response == NULL &&
!state->getpwent_state && !state->getgrent_state) {
nidle++;
if (!last_access || state->last_access < last_access) {