summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-20 07:13:05 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-20 07:13:05 +0000
commit8d2d97b17647d4a9c6bc39cb87ae99dc3c86cc06 (patch)
tree29315a880df2c5affdd157d58c5294287c4639c5
parentbb6af711b8f9a525b74198abbe7f1c37014ca6f7 (diff)
downloadsamba-8d2d97b17647d4a9c6bc39cb87ae99dc3c86cc06.tar.gz
samba-8d2d97b17647d4a9c6bc39cb87ae99dc3c86cc06.tar.bz2
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)
-rw-r--r--source3/libsmb/cliconnect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 08d9f3b382..86ff6b5c92 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;
}