mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
move to SAFE_FREE()
This commit is contained in:
parent
09bf442549
commit
549fe42bd4
@ -252,23 +252,10 @@ void cli_connection_free(struct cli_connection *con)
|
||||
free(oldcli);
|
||||
} */
|
||||
|
||||
if (con->srv_name != NULL)
|
||||
{
|
||||
free(con->srv_name);
|
||||
con->srv_name = NULL;
|
||||
}
|
||||
if (con->pipe_name != NULL)
|
||||
{
|
||||
free(con->pipe_name);
|
||||
con->pipe_name = NULL;
|
||||
}
|
||||
|
||||
if (con->auth_info != NULL)
|
||||
{
|
||||
free(con->auth_info);
|
||||
con->auth_info = NULL;
|
||||
}
|
||||
|
||||
SAFE_FREE(con->srv_name);
|
||||
SAFE_FREE(con->pipe_name);
|
||||
SAFE_FREE(con->auth_info);
|
||||
|
||||
memset(&con->usr_creds, 0, sizeof(con->usr_creds));
|
||||
|
||||
for (i = 0; i < num_cons; i++)
|
||||
@ -279,7 +266,7 @@ void cli_connection_free(struct cli_connection *con)
|
||||
}
|
||||
}
|
||||
|
||||
free(con);
|
||||
SAFE_FREE(con);
|
||||
}
|
||||
|
||||
void cli_connection_unlink(struct cli_connection *con)
|
||||
|
@ -363,10 +363,7 @@ static BOOL rpc_api_pipe(struct cli_state *cli, uint16 cmd, prs_struct *data, pr
|
||||
|
||||
/* Throw away returned params - we know we won't use them. */
|
||||
|
||||
if(rparam) {
|
||||
free(rparam);
|
||||
rparam = NULL;
|
||||
}
|
||||
SAFE_FREE(rparam);
|
||||
|
||||
if (prdata == NULL) {
|
||||
DEBUG(0,("rpc_api_pipe: cmd %x on pipe %x failed to return data.\n",
|
||||
@ -934,10 +931,8 @@ static BOOL rpc_pipe_set_hnd_state(struct cli_state *cli, char *pipe_name, uint1
|
||||
state_set = True;
|
||||
}
|
||||
|
||||
if (rparam)
|
||||
free(rparam);
|
||||
if (rdata)
|
||||
free(rdata );
|
||||
SAFE_FREE(rparam);
|
||||
SAFE_FREE(rdata);
|
||||
|
||||
return state_set;
|
||||
}
|
||||
|
@ -214,8 +214,7 @@ account password for domain %s.\n", domain));
|
||||
break;
|
||||
}
|
||||
|
||||
if(ip_list != NULL)
|
||||
free((char *)ip_list);
|
||||
SAFE_FREE(ip_list);
|
||||
|
||||
} else {
|
||||
res = modify_trust_password( domain, remote_machine,
|
||||
|
@ -52,10 +52,10 @@ static void cli_use_free(struct cli_use *cli)
|
||||
cli_ulogoff(cli->cli);
|
||||
cli_shutdown(cli->cli);
|
||||
}
|
||||
free(cli->cli);
|
||||
SAFE_FREE(cli->cli);
|
||||
}
|
||||
|
||||
free(cli);
|
||||
SAFE_FREE(cli);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -99,10 +99,10 @@ static void ncacn_np_use_free(struct ncacn_np_use *cli)
|
||||
ncacn_np_shutdown(cli->cli);
|
||||
}
|
||||
ZERO_STRUCTP(cli->cli);
|
||||
free(cli->cli);
|
||||
SAFE_FREE(cli->cli);
|
||||
}
|
||||
ZERO_STRUCTP(cli);
|
||||
free(cli);
|
||||
SAFE_FREE(cli);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user