summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net.c4
-rw-r--r--source3/utils/smbcacls.c5
-rw-r--r--source3/utils/smbtree.c1
3 files changed, 0 insertions, 10 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index 02373c7051..5a92766fa5 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -381,7 +381,6 @@ again:
DEBUG(1,("session request to %s failed (%s)\n",
called.name, cli_errstr(c)));
cli_shutdown(c);
- SAFE_FREE(c);
if ((p=strchr(called.name, '.'))) {
*p = 0;
goto again;
@@ -398,7 +397,6 @@ again:
if (!cli_negprot(c)) {
DEBUG(1,("protocol negotiation failed\n"));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
@@ -417,7 +415,6 @@ again:
if (!cli_session_setup(c, "", "", 0, "", 0, opt_workgroup)) {
DEBUG(1,("session setup failed: %s\n", cli_errstr(c)));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
DEBUG(3,("Anonymous login successful\n"));
@@ -428,7 +425,6 @@ again:
opt_password, strlen(opt_password)+1)) {
DEBUG(1,("tree connect failed: %s\n", cli_errstr(c)));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 2605442e8a..670e1f6efe 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -710,14 +710,12 @@ struct cli_state *connect_one(char *share)
if (!(c=cli_initialise(NULL)) || !cli_connect(c, server, &ip)) {
DEBUG(0,("Connection to %s failed\n", server));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
if (!cli_session_request(c, &calling, &called)) {
DEBUG(0,("session request to %s failed\n", called.name));
cli_shutdown(c);
- SAFE_FREE(c);
if (strcmp(called.name, "*SMBSERVER")) {
make_nmb_name(&called , "*SMBSERVER", 0x20);
goto again;
@@ -730,7 +728,6 @@ struct cli_state *connect_one(char *share)
if (!cli_negprot(c)) {
DEBUG(0,("protocol negotiation failed\n"));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
@@ -747,7 +744,6 @@ struct cli_state *connect_one(char *share)
lp_workgroup())) {
DEBUG(0,("session setup failed: %s\n", cli_errstr(c)));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
@@ -757,7 +753,6 @@ struct cli_state *connect_one(char *share)
password, strlen(password)+1)) {
DEBUG(0,("tree connect failed: %s\n", cli_errstr(c)));
cli_shutdown(c);
- SAFE_FREE(c);
return NULL;
}
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index 5b7e8a73c1..b06920418d 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -162,7 +162,6 @@ static struct cli_state *get_ipc_connect(char *server,
if (cli && cli->initialised)
cli_shutdown(cli);
- SAFE_FREE(cli);
return NULL;
}