diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-05-02 07:50:33 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-05-02 07:50:33 +0000 |
commit | a85ae6e0ae39530a96e8b86ab868cfd7ea5bc967 (patch) | |
tree | 35432f59704c89b60ef383048e57fe5e639e6d2a /source/client | |
parent | 610fcef4d33db2b62e6298bdb68546a2411d03b1 (diff) | |
download | samba-a85ae6e0ae39530a96e8b86ab868cfd7ea5bc967.tar.gz samba-a85ae6e0ae39530a96e8b86ab868cfd7ea5bc967.tar.xz samba-a85ae6e0ae39530a96e8b86ab868cfd7ea5bc967.zip |
and yet another memory leak - this one in the client
Diffstat (limited to 'source/client')
-rw-r--r-- | source/client/client.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/client/client.c b/source/client/client.c index 7431b2704e5..6449b1335c6 100644 --- a/source/client/client.c +++ b/source/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; } |