From eec9e8a052407611df223fec982588e7a2bd7f49 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 28 Nov 2001 03:56:30 +0000 Subject: fix a bunch of places where we can double-free a cli structure (This used to be commit e2ba2383c9f679c076749a8f4fccefc3559e37ec) --- source3/client/smbmount.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'source3/client/smbmount.c') diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index 3aeddfabca..02db69dfd5 100644 --- a/source3/client/smbmount.c +++ b/source3/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 -- cgit