summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-07-26 03:04:01 +0000
committerTim Potter <tpot@samba.org>2000-07-26 03:04:01 +0000
commita4243b3d9996738ff575d08fbdff5e3a3ba8adb3 (patch)
tree0045522c6c2a9b0897e853bebab741a290067ced /source3
parentbc22ae0b47bddd919b07e4c81ae12243c1f3226a (diff)
downloadsamba-a4243b3d9996738ff575d08fbdff5e3a3ba8adb3.tar.gz
samba-a4243b3d9996738ff575d08fbdff5e3a3ba8adb3.tar.bz2
samba-a4243b3d9996738ff575d08fbdff5e3a3ba8adb3.zip
Fixed memory leak in modify_trust_password()
(This used to be commit 7145689bf55b9f3100632badac486fde30ee4972)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_netlogon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 065bd57649..6437685ed8 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -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;
}