1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-10 12:58:35 +03:00

Fixed memory leak in modify_trust_password()

(This used to be commit 7145689bf55b9f3100632badac486fde30ee4972)
This commit is contained in:
Tim Potter 2000-07-26 03:04:01 +00:00
parent bc22ae0b47
commit a4243b3d99

View File

@ -513,24 +513,28 @@ static BOOL modify_trust_password( char *domain, char *remote_machine,
if(!resolve_name( remote_machine, &cli.dest_ip, 0x20)) {
DEBUG(0,("modify_trust_password: Can't resolve address for %s\n", remote_machine));
cli_shutdown(&cli);
return False;
}
if (ismyip(cli.dest_ip)) {
DEBUG(0,("modify_trust_password: Machine %s is one of our addresses. Cannot add \
to ourselves.\n", remote_machine));
cli_shutdown(&cli);
return False;
}
if (!cli_connect(&cli, remote_machine, &cli.dest_ip)) {
DEBUG(0,("modify_trust_password: unable to connect to SMB server on \
machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
cli_shutdown(&cli);
return False;
}
if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) {
DEBUG(0,("modify_trust_password: machine %s rejected the NetBIOS \
session request. Error was %s\n", remote_machine, cli_errstr(&cli) ));
cli_shutdown(&cli);
return False;
}