summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-05-02 07:50:33 +0000
committerAndrew Tridgell <tridge@samba.org>2000-05-02 07:50:33 +0000
commit88a97957e7d6547fc0a021127d1de52a132d341f (patch)
tree27fd07799a5dbec6da9c07c59a283789e3d577b0
parentc39e2e6f9a9fb3ac2e21ef31eaad6d280cfc3d9e (diff)
downloadsamba-88a97957e7d6547fc0a021127d1de52a132d341f.tar.gz
samba-88a97957e7d6547fc0a021127d1de52a132d341f.tar.bz2
samba-88a97957e7d6547fc0a021127d1de52a132d341f.zip
and yet another memory leak - this one in the client
(This used to be commit a85ae6e0ae39530a96e8b86ab868cfd7ea5bc967)
-rw-r--r--source3/client/client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 7431b2704e..6449b1335c 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1921,6 +1921,7 @@ struct cli_state *do_connect(char *server, char *share)
DEBUG(0,("session request to %s failed (%s)\n",
called.name, cli_errstr(c)));
cli_shutdown(c);
+ free(c);
if ((p=strchr(called.name, '.'))) {
*p = 0;
goto again;
@@ -1937,6 +1938,7 @@ struct cli_state *do_connect(char *server, char *share)
if (!cli_negprot(c)) {
DEBUG(0,("protocol negotiation failed\n"));
cli_shutdown(c);
+ free(c);
return NULL;
}
@@ -1955,6 +1957,8 @@ struct cli_state *do_connect(char *server, char *share)
if (password[0] || !username[0] ||
!cli_session_setup(c, "", "", 0, "", 0, workgroup)) {
DEBUG(0,("session setup failed: %s\n", cli_errstr(c)));
+ cli_shutdown(c);
+ free(c);
return NULL;
}
DEBUG(0,("Anonymous login successful\n"));
@@ -1978,6 +1982,7 @@ struct cli_state *do_connect(char *server, char *share)
password, strlen(password)+1)) {
DEBUG(0,("tree connect failed: %s\n", cli_errstr(c)));
cli_shutdown(c);
+ free(c);
return NULL;
}