summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2011-06-21 07:51:41 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-01 11:22:56 +0200
commit343ef46b9b764bfab93bad3fdcb4031adcc6f7db (patch)
treed0c79ea15d302d55b17bac7859c49e6e40a855f2
parentf3c3768d30410de8b0cc8b2ef078640bdc0864d4 (diff)
downloadsamba-343ef46b9b764bfab93bad3fdcb4031adcc6f7db.tar.gz
samba-343ef46b9b764bfab93bad3fdcb4031adcc6f7db.tar.bz2
samba-343ef46b9b764bfab93bad3fdcb4031adcc6f7db.zip
s3:smbldap: use smbldap_state as memory context for idle event
ensure the event is canceled if the smbldap_state gets freed this fixes a panic of winbindd if verify_idpool fails Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/lib/smbldap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index 38c7b207f5..3d159d73d9 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -1307,7 +1307,7 @@ static int smbldap_open(struct smbldap_state *ldap_state)
if (ldap_state->event_context != NULL) {
ldap_state->idle_event = event_add_timed(
- ldap_state->event_context, NULL,
+ ldap_state->event_context, ldap_state,
timeval_current_ofs(SMBLDAP_IDLE_TIME, 0),
smbldap_idle_fn, ldap_state);
}
@@ -1820,7 +1820,7 @@ static void smbldap_idle_fn(struct event_context *event_ctx,
/* this needs to be made monotonic clock aware inside tevent: */
state->idle_event = event_add_timed(
- event_ctx, NULL,
+ event_ctx, state,
timeval_add(&now_abs, SMBLDAP_IDLE_TIME, 0),
smbldap_idle_fn,
private_data);