summaryrefslogtreecommitdiffstats
path: root/source/client
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-11-28 03:56:30 +0000
committerAndrew Tridgell <tridge@samba.org>2001-11-28 03:56:30 +0000
commite2ba2383c9f679c076749a8f4fccefc3559e37ec (patch)
treed21ee71f2b8723d60e517c5954f6dca84d9a889b /source/client
parent39f076b56cf457cc780dd30a4d3150d8bfc60d13 (diff)
downloadsamba-e2ba2383c9f679c076749a8f4fccefc3559e37ec.tar.gz
samba-e2ba2383c9f679c076749a8f4fccefc3559e37ec.tar.xz
samba-e2ba2383c9f679c076749a8f4fccefc3559e37ec.zip
fix a bunch of places where we can double-free a cli structure
Diffstat (limited to 'source/client')
-rw-r--r--source/client/client.c4
-rw-r--r--source/client/smbmount.c6
2 files changed, 0 insertions, 10 deletions
diff --git a/source/client/client.c b/source/client/client.c
index 2b0867cf7b4..c3d1fbc7ecc 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -2124,7 +2124,6 @@ struct cli_state *do_connect(const char *server, const char *share)
d_printf("session request to %s failed (%s)\n",
called.name, cli_errstr(c));
cli_shutdown(c);
- SAFE_FREE(c);
if ((p=strchr_m(called.name, '.'))) {
*p = 0;
goto again;
@@ -2141,7 +2140,6 @@ struct cli_state *do_connect(const char *server, const char *share)
if (!cli_negprot(c)) {
d_printf("protocol negotiation failed\n");
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
@@ -2161,7 +2159,6 @@ struct cli_state *do_connect(const char *server, const char *share)
!cli_session_setup(c, "", "", 0, "", 0, workgroup)) {
d_printf("session setup failed: %s\n", cli_errstr(c));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
d_printf("Anonymous login successful\n");
@@ -2186,7 +2183,6 @@ struct cli_state *do_connect(const char *server, const char *share)
password, strlen(password)+1)) {
d_printf("tree connect failed: %s\n", cli_errstr(c));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
diff --git a/source/client/smbmount.c b/source/client/smbmount.c
index 3aeddfabca1..02db69dfd5a 100644
--- a/source/client/smbmount.c
+++ b/source/client/smbmount.c
@@ -149,7 +149,6 @@ static struct cli_state *do_connection(char *the_service)
DEBUG(0,("%d: Connection to %s failed\n", getpid(), server_n));
if (c) {
cli_shutdown(c);
- SAFE_FREE(c);
}
return NULL;
}
@@ -159,7 +158,6 @@ static struct cli_state *do_connection(char *the_service)
DEBUG(0,("%d: session request to %s failed (%s)\n",
getpid(), called.name, cli_errstr(c)));
cli_shutdown(c);
- SAFE_FREE(c);
if ((p=strchr_m(called.name, '.'))) {
*p = 0;
goto again;
@@ -176,7 +174,6 @@ static struct cli_state *do_connection(char *the_service)
if (!cli_negprot(c)) {
DEBUG(0,("%d: protocol negotiation failed\n", getpid()));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
@@ -198,7 +195,6 @@ static struct cli_state *do_connection(char *the_service)
DEBUG(0,("%d: session setup failed: %s\n",
getpid(), cli_errstr(c)));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
DEBUG(0,("Anonymous login successful\n"));
@@ -211,7 +207,6 @@ static struct cli_state *do_connection(char *the_service)
DEBUG(0,("%d: tree connect failed: %s\n",
getpid(), cli_errstr(c)));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
@@ -360,7 +355,6 @@ static void send_fs_socket(char *the_service, char *mount_point, struct cli_stat
If we don't do this we will "leak" sockets and memory on
each reconnection we have to make. */
cli_shutdown(c);
- SAFE_FREE(c);
if (!closed) {
/* redirect stdout & stderr since we can't know that