On Tue, Sep 03, 2002 at 01:29:34PM +0200, Kim R. Pedersen wrote: > Hello Samba-Fans, > > During my port of Samba to my company's new platform, I came across this bug > in 2.2.5 that I think someone else reported too. > > When Samba tries to connect to a password server (security = server or domain) > and the connection failes samba crashes some time after > attempt_netbios_session_request(). > > The problem is that the *cli structure is being freed in cli_shutdown() and > then reused in cli_initialized() during the attempt to connect a second time. > > I have therefore added a function cli_shutdown_nofree() that will save the > allocated flag and prevent cli_shutdown() from freeing the structure. > > I don't think this is a very clean solution, but changing the way cli > structures are allocated and freed is a major undertaking, that is best left > for the Samba team. (I personally dislike the way cli_initialize() and > cli_shutdown() might allocate and free the cli structure).
Good catch - I've fixed this in all active CVS trees. Thanks a *lot* ! Cheers, Jeremy.