Bugfix noticed by Herb. On using the again: tag as a
authorJeremy Allison <jra@samba.org>
Sun, 8 Jun 2008 21:17:47 +0000 (14:17 -0700)
committerJeremy Allison <jra@samba.org>
Sun, 8 Jun 2008 21:17:47 +0000 (14:17 -0700)
commit1061773401a2d9e0c7c73b7818cf16dcf2f018d6
tree97680fbc0c66ab0d5071fe1aef37f4c66af116d0
parent36729f6f1680310d51f126aa4b7760f11e405a9c
Bugfix noticed by Herb. On using the again: tag as a
goto target we were not reinitializing the array counts.

From Herb:

This is in the file nsswitch/winbindd_cm.c (samba-3.0.30) line 1236

We have a label again: where we keep trying to find the name of the DC
from the list of IPs returned by get_dcs. If we fail to figure out the
name we do a goto again at the end of the function. The problem is we
don't reset the num_dcs, num_addrs, etc and free the memory in the
various arrays. This seems wrong to me. I have a winbindd core where
I have 9 IPs returned for the DCs but at the time of the crash num_dcs
is 87 and if I look through the array dcs it keeps repeating entries
from the same group of 9

Jerry, Volker and Guenther please check.

Jeremy.
source/nsswitch/winbindd_cm.c