git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ef13ca
)
Fix a couple of memory leaks in the cli_establish_connection() code's failure
author
Andrew Bartlett
<abartlet@samba.org>
Sun, 20 Jan 2002 07:13:05 +0000
(07:13 +0000)
committer
Andrew Bartlett
<abartlet@samba.org>
Sun, 20 Jan 2002 07:13:05 +0000
(07:13 +0000)
case.
Thanks to Nigel Williams <nigel@wednesday.demon.co.uk> for spotting these!
Andrew Bartlett
source/libsmb/cliconnect.c
patch
|
blob
|
history
diff --git
a/source/libsmb/cliconnect.c
b/source/libsmb/cliconnect.c
index 08d9f3b3826ee44b67eed4a7fcf7dbcf3e7f9fb9..86ff6b5c9250724e6811b84ee8a3ede4cfd70b31 100644
(file)
--- 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;
}