diff options
author | Jeremy Allison <jra@samba.org> | 2002-09-03 19:19:20 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-09-03 19:19:20 +0000 |
commit | 0d9cde27370e3c6cc6df28c7ee8a32aa57e3ce42 (patch) | |
tree | 752a527b5af66237173b301c460ab383e2c4cf97 /source3/libsmb | |
parent | a27923691ba8d1496c1eaaab2559a10e4f41d694 (diff) | |
download | samba-0d9cde27370e3c6cc6df28c7ee8a32aa57e3ce42.tar.gz samba-0d9cde27370e3c6cc6df28c7ee8a32aa57e3ce42.tar.bz2 samba-0d9cde27370e3c6cc6df28c7ee8a32aa57e3ce42.zip |
Fix crashbug discovered by "Kim R. Pedersen" <krp@filanet.dk> where
cli struct was being deallocated in a called function.
Jeremy.
(This used to be commit e33e9defa657aa54594bb0c27f9be2f7b12aab1b)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 9ff4854998..885463bd34 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1307,7 +1307,13 @@ with error %s.\n", desthost, cli_errstr(cli) )); return False; } - cli_shutdown(cli); + /* + * We need to close the connection here but can't call cli_shutdown as + * will free an allocated cli struct. cli_close_connection was invented + * for this purpose. JRA. Based on work by "Kim R. Pedersen" <krp@filanet.dk>. + */ + + cli_close_connection(cli); if (!cli_initialise(cli) || !cli_connect(cli, desthost, pdest_ip) || |