diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-01-20 07:13:05 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-01-20 07:13:05 +0000 |
commit | 8d2d97b17647d4a9c6bc39cb87ae99dc3c86cc06 (patch) | |
tree | 29315a880df2c5affdd157d58c5294287c4639c5 /source3/libsmb/cliconnect.c | |
parent | bb6af711b8f9a525b74198abbe7f1c37014ca6f7 (diff) | |
download | samba-8d2d97b17647d4a9c6bc39cb87ae99dc3c86cc06.tar.gz samba-8d2d97b17647d4a9c6bc39cb87ae99dc3c86cc06.tar.xz samba-8d2d97b17647d4a9c6bc39cb87ae99dc3c86cc06.zip |
Fix a couple of memory leaks in the cli_establish_connection() code's failure
case.
Thanks to Nigel Williams <nigel@wednesday.demon.co.uk> for spotting these!
Andrew Bartlett
(This used to be commit 20e0b562283f75606ac9a36f3f104c6aaa294c40)
Diffstat (limited to 'source3/libsmb/cliconnect.c')
-rw-r--r-- | source3/libsmb/cliconnect.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 08d9f3b3826..86ff6b5c925 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1223,6 +1223,7 @@ again: } if (cli_set_port(cli, port) != port) { + cli_shutdown(cli); return NT_STATUS_UNSUCCESSFUL; } @@ -1235,6 +1236,7 @@ again: { DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n", nmb_namestr(&called), inet_ntoa(*dest_ip))); + cli_shutdown(cli); return NT_STATUS_UNSUCCESSFUL; } |