summaryrefslogtreecommitdiffstats
path: root/source/client/smbmount.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-09-17 00:52:47 +0000
committerSimo Sorce <idra@samba.org>2001-09-17 00:52:47 +0000
commit29db6ef7a7c4df51adf964c0aecb1164e4ab7dee (patch)
tree4f498d7bfef6015fcc660a0cd98c0fad924f48c3 /source/client/smbmount.c
parentb7edd55885791f9aded11a0b0a131e02a819f374 (diff)
downloadsamba-29db6ef7a7c4df51adf964c0aecb1164e4ab7dee.tar.gz
samba-29db6ef7a7c4df51adf964c0aecb1164e4ab7dee.tar.xz
samba-29db6ef7a7c4df51adf964c0aecb1164e4ab7dee.zip
move to SAFE_FREE()
Diffstat (limited to 'source/client/smbmount.c')
-rw-r--r--source/client/smbmount.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/client/smbmount.c b/source/client/smbmount.c
index a87eb789ef7..8650152faf3 100644
--- a/source/client/smbmount.c
+++ b/source/client/smbmount.c
@@ -153,7 +153,7 @@ static struct cli_state *do_connection(char *service)
DEBUG(0,("%d: Connection to %s failed\n", getpid(), server_n));
if (c) {
cli_shutdown(c);
- free(c);
+ SAFE_FREE(c);
}
return NULL;
}
@@ -163,7 +163,7 @@ static struct cli_state *do_connection(char *service)
DEBUG(0,("%d: session request to %s failed (%s)\n",
getpid(), called.name, cli_errstr(c)));
cli_shutdown(c);
- free(c);
+ SAFE_FREE(c);
if ((p=strchr_m(called.name, '.'))) {
*p = 0;
goto again;
@@ -180,7 +180,7 @@ static struct cli_state *do_connection(char *service)
if (!cli_negprot(c)) {
DEBUG(0,("%d: protocol negotiation failed\n", getpid()));
cli_shutdown(c);
- free(c);
+ SAFE_FREE(c);
return NULL;
}
@@ -198,7 +198,7 @@ static struct cli_state *do_connection(char *service)
DEBUG(0,("%d: session setup failed: %s\n",
getpid(), cli_errstr(c)));
cli_shutdown(c);
- free(c);
+ SAFE_FREE(c);
return NULL;
}
@@ -209,7 +209,7 @@ static struct cli_state *do_connection(char *service)
DEBUG(0,("%d: tree connect failed: %s\n",
getpid(), cli_errstr(c)));
cli_shutdown(c);
- free(c);
+ SAFE_FREE(c);
return NULL;
}
@@ -358,8 +358,7 @@ static void send_fs_socket(char *service, char *mount_point, struct cli_state *c
If we don't do this we will "leak" sockets and memory on
each reconnection we have to make. */
cli_shutdown(c);
- free(c);
- c = NULL;
+ SAFE_FREE(c);
if (!closed) {
/* redirect stdout & stderr since we can't know that