summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorRoel van Meer <rolek@alt001.com>2010-02-26 14:54:22 -0800
committerJeremy Allison <jra@samba.org>2010-02-26 14:54:22 -0800
commitcfc79f222d0fae7f976bb843da3565c58b2c375e (patch)
tree9899a7b4de43db9a303c17938d80d800746846fc /source3/winbindd
parentb28afd2bcc825e9fef415f3a256e39e4af1ae84e (diff)
downloadsamba-cfc79f222d0fae7f976bb843da3565c58b2c375e.tar.gz
samba-cfc79f222d0fae7f976bb843da3565c58b2c375e.tar.bz2
samba-cfc79f222d0fae7f976bb843da3565c58b2c375e.zip
Fix one of the valgrind warnings from bug #6814 - Fixes for problems reported by valgrind
The timeval passed to event_add_to_select_args() must be initialized as event_add_to_select_args() uses a timeval_min() on this and next_event.
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_dual.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 74b2b99b7f..26f92322a1 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -1463,6 +1463,14 @@ static bool fork_domain_child(struct winbindd_child *child)
FD_SET(state.sock, &r_fds);
maxfd = state.sock;
+ /*
+ * Initialize this high as event_add_to_select_args()
+ * uses a timeval_min() on this and next_event. Fix
+ * from Roel van Meer <rolek@alt001.com>.
+ */
+ t.tv_sec = 999999;
+ t.tv_usec = 0;
+
event_add_to_select_args(winbind_event_context(), &now,
&r_fds, &w_fds, &t, &maxfd);
tp = get_timed_events_timeout(winbind_event_context(), &t);