summaryrefslogtreecommitdiffstats
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
commit20e0b562283f75606ac9a36f3f104c6aaa294c40 (patch)
tree565016f9c8c3d7079b8eb7fd5310d2a35d504bb1
parent8ef13cabdddf58b741886782297fb64b2fb7e489 (diff)
downloadsamba-20e0b562283f75606ac9a36f3f104c6aaa294c40.tar.gz
samba-20e0b562283f75606ac9a36f3f104c6aaa294c40.tar.xz
samba-20e0b562283f75606ac9a36f3f104c6aaa294c40.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
-rw-r--r--source/libsmb/cliconnect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index 08d9f3b3826..86ff6b5c925 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/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;
}